Enginius/Linux
Periodic command in Linux (top 명령어는 이제 그만)
해리s
2011. 10. 5. 17:48
If you want to do periodic command in Linux (ie. monitoring resources), using "csh" will be your choice.
1. First get "csh" by typing
# apt-get install csh
2. Then type csh
# csh
3. Type like below
# while 1
? cat /proc/sched_debug
? sleep 3
? end
4. Done, you'll see what your CPUs are doing.
5. You can simply get out of csh by typing "exit".
위와 같이 할 경우 top 명령어를 안써도 된다
sched_debug를 modify해서 내가 원하는 정보를 모두 뽑아 낼 수 있는 것이다.
1. First get "csh" by typing
# apt-get install csh
2. Then type csh
# csh
3. Type like below
# while 1
? cat /proc/sched_debug
? sleep 3
? end
4. Done, you'll see what your CPUs are doing.
5. You can simply get out of csh by typing "exit".
위와 같이 할 경우 top 명령어를 안써도 된다
sched_debug를 modify해서 내가 원하는 정보를 모두 뽑아 낼 수 있는 것이다.