I am looking for a way to log & monitor my server hardware temperatures and load (like for CPU or RAM). How might I do that?
Objective is to:
- ensure hardware is not heating up
- identify what should be upgraded & what is in excess (like perhaps to learn maybe not to get such a good CPU for example)
Ok I can use one of the applets that live in the task bar but what about logging?
If you want something that does not depend on a desktop:
Have a look at lm-sensors . From the description:
From their project page (2016 edit: project is dead. Our own wiki has some info):
lm-sensors has a daemon, called sensord, that uses RRDtool for 'data logging and graphing system for time series data'. So it includes graphics like this that can be shown through a webserver:
(taken from lm-sensors project page).
To install the sensord daemon you will likely have to install the sensord package.
Example from my notebook:
The config file for this is located at
/etc/sensors3.conf
lm-sensors
is sort of the basic of any temperature measuring. Desktop items are more than likely to get their information from this package. An example If you want something that depends on a desktoppsensor.
Installation by adding a PPA:
sudo add-apt-repository ppa:jfi/ppa
sudo apt-get update && sudo apt-get install psensor
(Oneiric will have psensor included)
(old) example from ubuntugeek.com:
If programs like Cacti are too much then you could use a script which just logs to text file by day - run it with crontab. You need to have
lm-sensors
installed.This only works if there is a directory
/var/log/temperatures
which may need to be created first (sudo mkdir /var/log/temperatures
) and which only root can write to (so you would need to use the root crontab. If you want to use the per user crontab you could instead create/home/user/temperatures
(mkdir ~/temperatures
) and use that path in the script (use the full path in the script).For logging of cpu/ram/temperatures/traffic on a server, I recommended Cacti. It is advertised as a 'complete frontend for RRDtool', and can have multipled data sources such as lm-sensors, SNMP or even custom scripts. Data is stored in RRD, and used to create daily, weekly, monthly and yearly graphs.
See the Cacti website for more details, screenshots and links to live example sites. It can be tricky to set up the very first time, but is worth it in the end.
I use zenoss to monitor about 70 unix and windows servers at my office. We also monitor all networking equipment, and even a thermostat in the Server room. Most of it is via SNMP. (however, we use some custom written scripts to monitor some application performance)
Most servers (such as dell and hp) have internal temperature sensors, that you can query using SNMP. You can also monitor processes, CPU utilization, network throughput, etc. I get alerts if servers go offline, or start using too much CPU, or if critical processes go down.
Seriously, I can't urge enough to look at things like zenoss, hyperic, and nagios! the free versions can monitor multiple systems, but they can also just monitor one. They help with troubleshooting, and finding out what a server was doing at 2am when a problem happened.
Check the package munin, it can monitor almost everything.
https://help.ubuntu.com/lts/serverguide/munin.html https://wiki.ubuntuusers.de/munin
Check access permission in /etc/apache2/conf-enabled/munin.conf looking like this:
Restart apache2:
Fire your browser to: http://localhost/munin - enjoy.
Look into /etc/munin for further options.
check this link: https://launchpad.net/indicator-sysmonitor
(from OMG Ubuntu)
Installation:
sudo add-apt-repository ppa:alexeftimie/ppa
sudo apt-get update && sudo apt-get install indicator-sysmonitor
Remark: only works in Natty/11.04
I've been using pandora fms to monitor about 40 servers and 100 computer systems at my company as well as its webpage. You may find it usefull installing a software agent at your server and setting local modules to monitor what you need. If you'd like to try it here you can visit the webpage of pandora: Panndora FMS Unified Monitoring Tool
Regards
Ivo Yordanov