There are some really useful commands that can give information about the system directly from the console. Some of them are:
See a list of all the running processes using standard syntax:
# ps ax | less
See a list of all the running processes using BSD syntax:
# ps aux | less
See real-time information about running processes:
Pressing the L, T, M keys while top is running you can toggle the display of Average Load, CPU and Memory usage respectively. The Space key refreshes the display and Q key quits the program. There are a lot more, so you should check the man page.
Memory and SWAP space usage:
# free -m
Use the -m parameter to show the amount of memory in MB instead of bytes.
Check if a program is running:
# ps ax | grep PROGRAM | grep -v grep
Show filesystem and disk space usage:
# df -h
Show disk usage under the current directory
# du -hs
The -h parameter shows sizes in human readable formats (eg MB, GB) and the -s gives only a total. If it’s not used, then information about each subdirectory is shown.
There are a lot more. I’ll add more commands to this post in a future update. Stay tuned!
System Information using the console by George Notaras is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Copyright © 2005 - Some Rights Reserved