Interactive top command
top -H -p <processid> >> Gives all threads of the process.
shift + M >> Lists processes according to memory usage
shift + C >> Lists processes according to CPU usage
shift + W >> Save top output to a file (/root/.toprc.)
shift + O >> For sorting the process as per requirement
Commands:
c >> shows full path of the process
k >> For killing the process
z >> Listing running process in color
r >> For renice a process
1 >> shows the details of individual CPU's running on the system
d >> change refresh rate
A (caps) >> split top output into multiple screens
a >> to toggle to screens
h >> For help
n >> Reduce the number of listed process to n
Batch mode:
top -b -n 3 > /tmp/topoutput.txt
-b => batchmode
-n => number of iterations in batch mode
-H => Dispaly in threads mode
-o => Sort order on a column + or - prepend.
Some other helpful commands:
htop
iostat -dmx 2 10
dstat -vm
tcpdump -i eth0 -A port 9042
No comments:
Post a Comment