|
-
Monitoring commands
Does anyone have any monitoring commands they like to use? I currently use top -s to monitor what's currently happening and occasionally sar -q to see if the server had any high loads at certain points.
-
-
Great question. In my experience, you have 4 main things that you have to stay on top of.
1) CPU
2) Memory
3) Disk
4) Network
`top -c` will give you a good indication of CPU & Memory, but it won't tell you much about Disk or Network. For a quick snapshot of disk i/o, I prefer using `iotop`, and to get a quick look at network I usually look at `netstat -tuna`. Also, we like to run `vnstat` on our servers so that it tracks the historical usage of network as well as the current usage. We have some fancy nagios scripts that pull and parse vnstat data out and alert us if things start getting crazy.
Great question. Glad you asked.
-
-
root@clients [~]# vnstat
bash: vnstat: command not found
=================================
root@clients [~]# iotop
bash: iotop: command not found
=================================
By the looks of it, I won't be testing out either of them any time soon.
-
-
 Originally Posted by MustangV10
root@clients [~]# vnstat
bash: vnstat: command not found
=================================
root@clients [~]# iotop
bash: iotop: command not found
=================================
By the looks of it, I won't be testing out either of them any time soon. 
Which distro are you running? (Debian, RedHat, SuSE, Ubuntu, etc...)
-
-
Check for applications like vmstat, iostat, mpstat. Also don't forget trusty ps aux --sort pcpu.
RHEL editions usually have a tool called dstat as well.
Last edited by grim76; 11-22-2011 at 09:59 PM.
Reason: Forgot one
-
-
 Originally Posted by MustangV10
By the looks of it, I won't be testing out either of them any time soon. 
Don't give up so soon! It's easy to install them, e.g. if you're on fedora the package names are the same as the program names, so just find them in Add/Remove Software (or do yum install vnstat iostat).
I love the simple things. In addition to the things mentioned, I like a good ps or lsof command. Instructive examples:
Code:
• ps axru
# shows running processes with extra info
• ps -FC httpd
# shows httpd processes with extra info
• ps -eo pcpu,rss,pid,comm --sort=-rss | head
# shows most ram-heavy processes
• lsof /var/log/messages
• lsof +d /var/log
• lsof +D /var/log
• lsof -c bas
#info on what cmd starting with 'bas' in its name has open
• lsof -p 20628
#info on what PID has open
• lsof -u ryran -c fire
#all ryran's procs + all fire.* procs as well
• lsof -c httpd -a +D /var/www/html
#all processes that have open files in /var/www/html and are named httpd.*
• lsof -i
#list internet files (open ports & established connections)
• lsof -i tcp:ssh,80
• lsof -i tcp -a -u ryran
-
The Following User Says Thank You to ryran For This Useful Post:
Similar Threads
-
By tomfmason in forum Command Line
Replies: 2
Last Post: 11-13-2011, 04:29 PM
-
By Rob in forum Linux Commands
Replies: 0
Last Post: 11-03-2011, 09:47 AM
-
By Fred in forum Linux News
Replies: 0
Last Post: 11-01-2011, 07:30 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Check out Linux Central for Linux software and other goodies!
» Recent Threads
» Stats
Members: 3,560
Threads: 3,917
Posts: 9,434
Top Poster: Fred (1,486)
Welcome to our newest member, ajit102
» Links
|
Bookmarks