If you’re looking for a tool to easily and quickly check on your Linux(RedHat, CentOS, Fedora) server’s current performance status using your iPhone, Bjango’s iStat application is the ideal solution. Using iStat’s sleek, easy to understand interface, you can quickly check your server’s current load levels, disk usage, memory usage, and traffic in/out status.

To Start

By default, iStat uses TCP port 5109 to communicate on. You can of course change this in the config file which we will highlight a bit furhter into this tutorial, however whichever you decide to use, you will need to make sure you have opened it up in your firewall for the iStat iPhone app to be able to communicate with the server app.

Download iStat Server

iStat server for Linux can be downloaded from github and in the example below we are using version 0.5.7. To ensure you are installing the latest version, you should head over to github and then adjust the version below accordingly if an update iStat server version has been released:

wget https://github.com/downloads/tiwilliam/istatd/istatd-0.5.7.tar.gz

note: if you get a certificate error, use the following link:

wget –no-check-certificate https://github.com/downloads/tiwilliam/istatd/istatd-0.5.7.tar.gz

Once you’ve downloaded iStat server, we just need to extract the files and then we’re ready to do the install:

tar -zxvf istatd-*.tar.gz
cd istatd-*

Install iStat Server

Configure iStat for your server:

./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

Adjust iStat Server Configuration

Before you start using iStat server, you will first need to modify the configuration file for your system:

nano /usr/local/etc/istat.conf

Adjust the server_code(this is your login pin) and anything else you wish to change, e.g. network_port number. You may also want to adjust the monitor_disk settings to add additional mounted disks you wish to check, e.g. backup.

#
# /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

Start iStat Server

Now that  you’ve configured iStat server, your ready to launch the iStat daemon:

/usr/local/bin/istatd -d

Install iStat iPhone Application

Now you can head over to Bjango’s site to check out the iPhone application and download it using iTunes. Once you’ve installed it on your iPhone, just add your server ip address and enter the server_code from your configuration file when prompted.

Launch iStat Server at startup

So that iStat Server loads automatically if the server is restarted, it’s a good idea to it to the rc.local file which will take care of that for you:

nano /etc/rc.d/rc.local

Add the following to the bottom of the file and then close and save.

/usr/local/bin/istatd -d

Prevent iStat Server daemon being shutdown

If you have any process tracking applications running on your server that may shut down the iStat daemon (e.g. ConfigServer Security & Firewall), you may want to exempt the daemon in the appropriate settings section for that application.

For example, in CSF you would open the lfd.pignore file and add the following entry:

exe:/usr/local/bin/istatd

Hopefully you now have a running installation of iStat Server for linux and can enjoy easy monitoring on the go.

 

Comments are closed.