A micro web server to monitor Linux md RAIDs status and filesystem occupancy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Didier Kryn 1f88c26197 Typos. 2 years ago
src initial commit 2 years ago
LICENSE Initial commit 2 years ago
Makefile correct .PHONY stanza in Makefile 2 years ago
README.md Typos. 2 years ago
diskweb.sh initial commit 2 years ago

README.md

This is a small http server, originally inspired by micro-httpd, for its small size, but with the intention to serve dynamic content instead of static files.

The primary reason to use an http server is that it is a simpler method to display graphics than interfacing with a graphics library like Gtk or Qt.

The second reason is that it is still usable on systems without graphics capability, since it is enough to have a network connection and view the graphics from a remote full-fledged computer.

This server provides monitoring of file system status and md RAID status. Monitoring of other system-critical components could be added.

This server follows http 1.0 protocol, which means that the connexion is closed immediately after the content have been transferred. This makes it usable to serve one request after the other and have only one session at a time.

Data transferred reflects the status of the file systems and of the RAID(s) at the moment of the request. There is no automatic update. To obtain updates, the user must repeat the request (by using the "refresh" button of the web browser).

PORT NUMBER

This server expects connections on port 8085 by default. If another port number is desired, it can be changed by one of 4 means:

  • on the command line, execute 'httpd port-number'

  • in src/httpd.c: change the line #define LISTEN

  • add the line above in /src/diskweb.h

  • in the makefile, add a -D option to the gcc command to do the same

diskweb's httpd can also be executed through inetd, in which case it does not listen to any port and the listening port is part of inetd's configuration.

BUILDING and INSTALLING

To just compile the executable file httpd, run 'make';

to delete it, run 'make clean';

to install /usr/local/diskweb/httpd, run 'make install';

to uninstall it, run 'make uninstall'.

No sysv-rc, runit, s6, or other init scipt is provided. The easy way to start diskweb on Devuan is to copy the file diskweb.sh in /etc/boot.d ; commands in this directory are executed by /etc/rc.local as the last step of system startup. This script is not installed by 'make install' because it would require root priviledge.

Note that root priviledge is needed to listen on a port number lower that 1024.