The istat application is a monitoring application use to obtain basic Linux server information from your iPhone or iPod Touch. The application has the ability to monitor CPU Usage, Memory Usage, Disk Usage, CPU Load, and Server Uptime. Its a great looking interface, as shown below, to obtain this information easily from your servers.
To install istat on CentOS Linux follow the directions below.
- Download istat: Download istat for Linux here.
- Configure istat: Unpack the istat package you downloaded from Google Code and change the directory into the newly created istat directory. Once in this directory type the below command to configure istat for your server.
- ./configure
- Install istat: Now issue the make and make install commands to compile and install istat on your server.
- make
- make install
- Create istat User: Now issue the below command to create a istat user to run istat.
- useradd istat
- Create istat Directory: Use the below syntax to create a directory to store the istat.pid file which needs to be readable/writeable by the istat user you just created.
- mkdir /var/run/istat
- chown istat.istat /var/run/istat
- Configure istat: Now make necessary configuration changes to the /usr/local/etc/istat.conf configuration file. The typical changes include modifying the server_code which is the access code used by your iDevice to obtain the server information, monitor_net which is the interface istat will listen for incoming connections, and monitor_disk which needs to be changed to the proper mounts such as /dev/hdb1, /dev/hdc1, etc.
- Launch istat: Now launch the istat daemon by issuing the below command.
- /usr/local/bin/istatd &
The server will automatically launch with the istat user and listen on port 5109.
- Connect From iPhone: Now configure the new server within istat on your iPod Touch or iPhone. Once you do so click on the server, type in the password you set in step 6, and verify you are collecting all of the server statistics properly.
The istat application is a nifty little application to provide you a quick view of servers on your network or servers that you monitor outside of your network. More information about the iPhone version of istat can be located here.
Alex, thanks for this write up.
I’m trying to get istatd working on a CentOS install (Slicehost) and am having some problems. Initially I
tried using the latest .rpm package that was provided recently by the project, but that wasn’t working.
I stepped through your instructions and everything went smoothly until I tried to start the daemon and received the following errors:
– Could not read cache file ‘/var/cache/istat/clients.dat’: Permission denied
– Could not bind socket: Address already in use
Any ideas what might be happening here?
When I run netstat, I’m listening on port 5109 and /tmp/istatd.sock is bound.
Thanks for your help!
Hello Michael R.,
Sorry for the delayed response. It sounds like you actually have it running. The one issue may be that you need to check the permissions on the clients.dat file. If it doesn’t exist just touch it so you create it. Then make sure it is owned by the user running the istatd process such as “chown user.group clients.dat”.
If you already did resolve your issue we would love to hear about it so maybe it helps others in the future. Thanks!
I just did:
wget http://istatd.googlecode.com/files/istatd-0.5.4-1.el5.rych.i386.rpm
rpm -ivh istatd-0.5.4-1.el5.rych.i386.rpm
emacs /etc/istat.conf
[set the code to something non-obvious]
service istatd restart
Works fine on Centos-5-based Trixbox servers
Hello wpns,
Great. Thanks for the detailed feedback.
istatd was succesfully installed (by my host) and everything seems ok, but I can’t connect with my iphone, whenever I try to test it fails.
I’ve tried using my site name, my ip, my hostname, and nothing works.
Is there a way to tell my istatd server is working? or that it proper listens on that port?
Thanks a lot in advance
Do you have your firewall set? Run the following post results (omit sensitive data!!).
sudo iptables -L
—
I had to add the port to my table
# Accept tcp packets to istatd (5109)
iptables -A INPUT -p tcp –dport 5109 -j ACCEPT
Make sure you save the command to your iptables.up.rules (or the like).
More info, http://wiki.centos.org/HowTos/Network/IPTables
Hello xadio,
Thanks for providing the input. This definitely could be causing people issues if they have a firewall up and are not allowing the configured istatd port.
Thanks!
alex
I’m running Ubuntu, and required to install libxml2-dev
apt-get install libxml2-dev
Hello Ryan,
Thanks for the info! This will surely help others running Ubuntu.
Thanks.
alex
I’m installing on RHEL5, and everything is working. However, when I update my server_code in /usr/local/etc and restart the daemon using istatd -d the changes don’t take.
The .conf looks good.
Any suggestions? Thx.
Hello Rob,
Is it possible the ownership or permissions on the configuration file are incorrect? What about the possibility of a second configuration file? Have you attempted to “locate“? Any further details you can provide would be great and I will do my best to provide a resolution for you. It has been awhile since I configured istat however maybe I can provide more suggestions.
Thanks.
alex
Thank you Alex. Sorry for the delayed response. The HD on our server was diagnosed with bad sectors so we had to replace it. Lots of work to get the system restored.
After reinstalling iStat on this RHEL5 system, I’m experiencing the same problem.
issuing a locate command reveals :
root@server [/usr/local/etc]# locate istat.conf
/usr/local/etc/istat.conf
/usr/local/share/man/man5/istat.conf.5
I have also updated the locate DB (updatedb).
I have istatd installed at the default /usr/local/bin. I have my istat.cong permissions set to 644.
I entered the default code ‘12345’ into my iPhone and iStat is seeing the server fine. The only problem is that I can’t change the server code (or any other settings).
Any ideas?
Hello Rob,
Unfortunately I don’t have any ideas right off but will respond again if I can think of something. I would verify permissions and owners on all of the folders and files to see if that is what is causing the issue.
Thanks.
alex