Installing iStat server on Red Hat Enterprise Linux
10 Mar 2010
Bjango iStat for iPhone is a fantastic app for keeping an eye on a Mac server and thanks to the work William Tisater, can monitor Linux, FreeBSD and Solaris servers as well.
I installed iStat server on a server running Red Hat Enterprise Linux 5.3 but these instructions should work with other Red Hat, CentOS and Fedora distros. For Debian and Ubuntu distros, pop over here.
Preparation
You shouldn't be logged in as root but let's give ourselves temporary root permissions for the install:
sudo -i
If you're a good sys admin and have locked down all unused server ports, open up port 5109 with system-config-securitylevel-tui and adding 5109:tcp to the Customize, Other ports field if planning on using the default iStat port. You'll also need to install development tools if you haven't done this already:
yum groupinstall "Development Tools"
Download iStat server
iStat server for Linux, FreeBSD and Solaris is maintained at github and you should pop over there to make sure the latest version corresponds with the wget command below:
wget http://github.com/downloads/tiwilliam/istatd/istatd-0.5.6.tar.gz tar -zxvf istatd-*.tar.gz cd istatd-*
Setup iStat server
Configure iStat for your server:
./configure
If, like me, you get an xml2-config error, install libxml2-dev and run ./configure again:
yum install libxml2-devel ./configure
Compile and install:
make make install
Add an istat user and create a directory to store istat.pid:
useradd istat mkdir /var/run/istat chown istat /var/run/istat
Tweak the iStat server configuration
Before launching the iStat server, first modify the configuration file for your system:
nano /usr/local/etc/istat.conf
Modify the server_code and anything else to match your system. In my case I also modified monitor_disk:
# # /etc/istat.conf: Configuration for iStat server # # network_addr 127.0.0.1 # network_port 5109 server_code 12345 # server_user istat # server_group istat # server_socket /tmp/istatd.sock # server_pid /var/run/istat/istatd.pid # cache_dir /var/cache/istat # Note: Only support for one network interface, limited by client. monitor_net ( eth0 ) # Array of disks to monitor. Specify mount path or device name. # monitor_disk ( / /home ) monitor_disk ( / ) # Set to 1 if you want to use mount path as label instead of the device name. disk_mount_path_label 0 # Try to probe the filesystem for disk label, will override the mount path label. disk_filesystem_label 1 # Set custom disk label. Will override all other labels. # disk_rename_label /dev/sda1 "root" # disk_rename_label /home "home" # End of file
Launch iStat server
With the configuration saved, iStat server is ready to launch:
/usr/local/bin/istatd -d
Add your server to iStat for iPhone using the server_code in the iStat server configuration file and start enjoying Bjangolicous server stats.

iStat server running on Red Hat
Launch iStat server at startup
It's not a bad idea to launch iStat server at startup:
nano /etc/rc.d/rc.local
Add the following to the bottom of /etc/rc.d/rc.local should do the the trick:
/usr/local/bin/istatd -d
You may want to restart your server to confirm iStat server launched OK. If you run into any problems, let me know in the comments and I'll see what I can do.
Very useful article! But I've got some issues executing the above on a CentOS 5.0 server.
/etc/rc.d/rc.local doesn't seem to exist neither the command 'useradd'.
As you might have noticed I'm a SSH / Linux beginner.
CentOS 5 (running 5.4 here) does have useradd and /etc/rc.d/rc.local but these will not be available if you're not running under root permissions. The easiest way to do this is type 'sudo -i' to temporarily run under root. Hope this helps.
I have istat up and running successfully on Apache Redhat. The problem that I'm having is that I can't get all the mount points to load. The only drive appearing is /home. I have tried entering monitor_disk (/home2) I have also drive monitor_disk (/dev/dha8) (hda8 = home2) I currently have 5 mounts I am trying to view however, no matter how I enter them into the istat.conf, only home shows up. Any ideas?
i absolutely love this program!