Installing iStat server on Debian / Ubuntu
24 Oct 2009
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. The Linux server monitor doesn't yet have the fan and temperature features available for Macs but since my server's running in a cloud, this isn't important.
I installed iStat server on Pukupi running Debian 5.0 (lenny) but these instructions should work with other Debian and Ubuntu distros:
Preparation
If you're a good sys admin and have locked down all unused server ports, open up port 5109 in iptables if planning on using the default iStat port. You'll also need to install build tools if you haven't done this already:
sudo apt-get install build-essential
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.5.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:
sudo apt-get install libxml2-dev ./configure
Compile and install:
make sudo make install
Add an istat user and create a directory to store istat.pid:
sudo useradd istat sudo mkdir /var/run/istat sudo chown istat /var/run/istat
Tweak the iStat server configuration
Before launching the iStat server, first modify the configuration file for your system:
sudo 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 and set the disk_rename_label:
# # /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 /dev/sda1 "Kyle's Server" # disk_rename_label /home "home" # End of file
Launch iStat server
With the configuration saved, iStat server is ready to launch:
sudo /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 Pukupi
Launch iStat server at startup
It's not a bad idea to create a wee script to launch iStat server at startup:
sudo nano /etc/init.d/istatlauncher
The following basic istatlauncher script should do the the trick:
#!/bin/sh /usr/local/bin/istatd -d
Make the script executable then add it to the system start up items:
sudo chmod +x /etc/init.d/istatlauncher sudo update-rc.d istatlauncher defaults
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.
Great tutorial! It worked like a charm on Ubuntu 9.10 and now I can monitor all my servers from anywhere.
All is well, however no sign of current tasks or all of the paths in the array, I'm assuming I'm OK to add in /var/www to my array of directories, or are they simply mount points only?
monitor_disk is for mount points only. Although the current version of iStat for iPhone shows processes (top) on the device screen, it doesn't show current processors for connected iStat servers on any platform.
Thanks, great tutorial. Unfortunatly the istatlauncher script doesn't work. When I manually run /etc/init.d/istatlauncher it says:
"Could not create pid file /var/run/iStat.pid: No such file or directory"
What could I be doing wrong?
Hm forgot to run it as root when running it manually. That works (nog more pid error). But it still doesn't work on boot.
Never mind, it was a bug in upstart:
http://ubuntuforums.org/showthread.php?p=8548144
Cheers
Thanks! This was an excellent tutorial.
nice post!! I got it installed on one of my servers then built this quick installer for the rest... fork/download here!
http://github.com/citrus/iStat-Server-Installer
enjoi!