Fork me on GitHub


As an avid OpenBSD user, I use OpenBSD for virtually everything...including a great deal of mass web/email hosting. I use the symon/symux packages by Willem Dijkstra to monitor system performance, but the graphs produced by syweb don't provide a nice up-to-the-second overview of things (plus I loathe putting a shell in my chroot'ed apache). Sometimes it's nice to have a brief overview of things, and existing projects such as phpSysInfo don't work well on OpenBSD / within a chroot'd apache... and that motivated me to write phpsymon.

phpsymon is a simple PHP script that listens on the address and port (default and 2100, respectively) that symon streams its output to. Once the stats are grabbed, it parses the output into an easy-to-read overview of things.


1 March 2011
I'm currently in the process of switching over to Git for version control. Additionally, I'll be adding some new features and hopefully make configuration a bit easier. Expect some work shortly.
4 September 2010
More questions from users regarding connection difficulty. Please be sure to read the F.A.Q.'s below, as all questions I receive regarding this are answered there.
1 December 2009
Version 2.0 released. Includes cleaner interface that's better for viewing multiple hosts.
12 July 2009
Version 1.9 released. Includes support for the newer versions of symon/symux which slightly changed the format of some of the reported data (again).
28 May 2009
Verion 1.8 released. Includes support for newer versions of symon/symux, which slightly changed the format of some of the reported data.
September 2005
phpSymon was featured in a September 2005 article on! Click here to view.


The following are all of the variables used in config/config.php to control phpsymon's function.

This is the address you want to read symon stats FROM. (Default is "".)

NOTE: This host needs to be running symux and have it configured correctly for each host you want to read stats from.
This is the port at the address you want to read symon stats from. (Default is "2100".)
Multiple hosts running symon can stream their stats to a given address/port where symux is running. This is the host you want to display stats for. (Default is "".)
If many hosts are streaming their symon stats to the address/port you are connecting to, this option specifies how many datums to read before giving up. So, if n hosts stream their symon stats to the same address/port, this should be n. (Default is 1.)
WARNING: If the host you are wanting to view only updates its symon stats every m seconds, then you could wait up to m * n seconds! Be careful with this!
How often (in seconds) you want the screen to auto-refresh. 0 = never. (Default is 0.)

In addition to the above, phpSymon can be configured in the following ways...

Disk Mount Point Names
If you monitor df data through symon, you may want to run the script in the config directory, and store the output into config/df_mounts.php. When df data is displayed, it will then show mount points.
What about the GUI, is that configurable?
See the FAQ entry about that.


Obligatory. Click each to embiggen.


This demo is temporarily disabled.

Frequently Asked Questions

Click each to show/hide the answer.

What about the Look-n-Feel, is that configurable?
phpsymon uses a CSS style sheet in the main directory that can be modified to change the fonts/color/etc.

Additionally, the templates for each "block" of symon data are stored in the templates/ sub directory, and modifying the HTML there is rather straight-forward.

The main structure of the display (which "blocks" are displayed where) can very easily be changed by modifying the index.php page. Near the bottom is an HTML table that's used to control the location of all of the blocks.
Why does phpsymon sometimes take 5+ seconds to render the stats?
By default, symon only collects system stats every 5 seconds, so (in turn) symux only streams this output every 5 seconds. Thus, if you try to view phpsymon in-between updates, you could wait up to 5 seconds before the stats are available.
I can't seem to view any stats, it just errors out. My Apache error_log file reports the following error...
If the error is:
         [error] PHP Warning:  socket_connect(): unable to connect [61]: Connection refused in /path/to/symon/symon.php on line 43 
Then that means you aren't running symux on the host you are reading stats from. If you have symon streaming stats to a host, call it picard, then picard also needs to be running symux, and the symux config file on picard must be set to accept symon stats from each host. (See the next FAQ for more info on how to setup symon/symon for multiple hosts.)
I've tried the above, but I still can't connect/view-stats!
A few people have reported this, but in all cases I'm aware of, it's because of incorrect setup between the clients running symon and the host they stream their stats to.

Your setup should be like the following. Say we have two hosts, named data and worf, with IP addresses and, respectively. We want to view symon stats from these two hosts, so we install symon on both of them and stream their stats to another host (it could be either data or worf), named picard, with IP address Since picard is receiving the data, it needs symux installed and running.

Now, in this setup, you would run symon on hosts data and worf with something like the following in their /etc/symon.conf file:
         monitor { cpu(0), mem, pf, mbuf, ...  } stream to 2100 
And something like the following in /etc/symux.conf on host picard:
         # where to listen for incoming data
         mux 2100

         # accept symon stats from host "data"
         source {
            accept { cpu(0),  mem, pf, mbuf, ... }

            datadir "/var/www/symon/rrds/data"

         # accept symon stats from host "worf"
         source {
            accept { cpu(0), mem, pf, mbuf, ... }

            datadir "/var/www/symon/rrds/worf"
Now, in the phpsymon file config/config.php, you should have the following variables set as you see them:
         $config['SymuxAddress'] = "";
         $config['SymuxPort']    = "2100";
         $config['SymonHost']    = ""; 
The first two variables instruct phpsymon to read stats from host picard on the appropriate port. The third variable, tells phpsymon which host to display information from.

If you think your setup is correct, but are still having problems, you can try telnet'ing to the IP/port where all of the clients are streaming their symon stats, from the machine where phpsymon is running. If your setup is correct, you should see something like the following (color added for emphasis):
ryan@godel# telnet 2100
Connected to
Escape character is '^]'.;io:cd1:1126931708:0:0:0:0:0;io:cd0:1126931708:0:0:0:0:0;io:wd0:11269
Each line of output corresponds to symon stats from a host, and the first word of each is line is the IP of the host. So...
  • If you never see stats for the host you want, chances are symux isn't configured to accept stats from that host, or there's a firewall issue between the two hosts in question.
  • If you can't even connect to that IP/port via telnet, then either symux isn't running on that machine, or there is a firewall issue.
If you can see stats for each host you want, yet phpsymon still isn't showing the hosts email me.
Why doesn't phpsymon report system uptime?
This is by far the most frequently asked question.

Simply put, symon doesn't collect that information. Also, there is no easy way for PHP to grab this when Apache is running chroot'ed. If you really want to know your uptime that badly, consider running Apache un-chroot'ed. (Oddly, people have done just that.)

Download & Installation

The current version of phpSymon can be downloaded here: phpsymon-2.0.tgz.

Download the and unzip in the web-directory where you want to vew the stats in.
         $ tar xzf /path/to/downloaded/phpsymon.tgz
         $ cd phpsymon
         $ vi config/config.php
         edit the relevant configuration options. 
Simply remove the phpsymon directory created when you unzip the tgz.

Roadmap (Future Work)

Long term goals (i.e. not for a while!):