HP-UX
1753513 회원
5442 온라인
108795 솔루션
새 메시지

adb 명령어에 대해

 
전태용
비정기 기여자

adb 명령어에 대해

현재 디스크 찾기

echo 'boot_string/S' |adb /stand/vmunix /dev/mem

메모리 용량 확인

echo "phys_mem_pages/2d" | adb /stand/vmunix /dev/kmem



음..adb 명령어의 의미를 도저히 모르겠습니다.

뭐 그냥 외어라 -_-) 라는 말씀은 하지 마시고..

뭐 사실 그냥 외워도 되지만...

man adb를 보더라도 도저히 모르겠더군요.



죄송한 부탁이지만. 차례대로 분석해 주시면 좋겠습니다.

초보자 티를 팍팍 내어 봅니다!

2 응답 2
고광태
중학생

adb 명령어에 대해

adb 라는 명령어는 커널에 있는 파라메타를 읽거나 변경하거나

커널에서 떨어진 core 파일을 debugger 하는 툴입니다.



HPUX 에서는 기본으로 들어가 있습니다.



위에 명령어들은 단순히 adb 라는 명령어를 통해서 커널에 있는 파라메타를 디바이스파일 /dev/kmem 을 통해서 읽는것입니다.
김병수
본과생

adb 명령어에 대해

adb는 absolute debugger tool입니다.



# adb -k /stand/vmunix /dev/kmem 하시면 찾고자하는 내용의 변수값을 이용하여 그값을 찾을수 있는데요..



그변수의 값을 다 알기기란 매우 힘듭니다.



아래의 내용처럼 변수의 값을 외워야 합니다.

echo phys_mem_pages/D | adb /stand/vmunix /dev/kmem



phys_mem_pages:

phys_mem_pages: 24576



for 64 bit systems :



example:



echo phys_mem_pages/D | adb64 /stand/vmunix /dev/mem



phys_mem_pages:

phys_mem_pages: 262144





To determine the amount of lockable memory for 32 bit systems :



example:



echo total_lockable_mem/D | adb /stand/vmunix /dev/mem



total_lockable_mem:

total_lockable_mem: 185280



for 64 bit systems :



echo total_lockable_mem/D |adb64 /stand/vmunix /dev/mem



total_lockable_mem:

total_lockable_mem: 283750



Total lockable memory is expressed in Kilobytes



To determine the number of free swap 4096 byte memory pages :

example:



echo swapspc_cnt/D | adb /stand/vmunix /dev/kmem



swapspc_cnt:

swapspc_cnt: 216447







To determine the CPU speed:



example:



echo itick_per_usec/D | adb /stand/vmunix /dev/mem



itick_per_usec:

itick_per_usec: 360



To determine the number of processors in use:



example:



echo "runningprocs/D" | adb /stand/vmunix /dev/mem



runningprocs:

runningprocs: 2



To determine the number of 4096 byte memory pages of buffer cache



example:



echo bufpages/D | adb /stand/vmunix /dev/mem

bufpages:

bufpages: 18848



To display kernel parameters using adb use the parameter name :



example:



echo nproc/D | adb /stand/vmunix /dev/mem



nproc:

nproc: 276





To determine the kernel you are booted from:



example:





echo 'boot_string/S' | adb /stand/vmunix /dev/mem

boot_string:

boot_string: disc(52.6.0;0)/stand/vmunix







예제에서 보여지는 것과 마찬가지로..



# adb -k /stand/vmunix /dev/kmem

boot_string/S

boot_string:

boot_string: disk(0/0/1/1.2.0.0.0.0.0;0)/stand/vmunix

이런 값을 얻을수 있는것입니다.



$! ---> exit



ADB 는 maintains a set of registers corresponding to the registers of the machine

설명을 드리기가 너무 어렵습니다. 각각의 register값을 알아야 하기 때문이지요..



http://docs.hp.com에 가시면 search를 adb하시면 사용방법에 대한내용이 있습니다.



참조하시기 바랍니다.



그럼~~~