Keep watch over your server system with Webmin
Log Files, System Monitoring, and Automatic Jobs
Even with logfiles, Webmin clearly distinguishes between its own stuff and the operating system in which it runs. The Webmin | Webmin Actions Log window is a search interface for Webmin's internal log. Use it whenever you need to figure out exactly what you did in all of Webmin or just in some of its modules.
Rotation of system logfiles – and definition of post-rotation commands for each of them – has its own panel in the System section. Monitoring system performance is split between Networking | Bandwidth Monitoring and Others | System and Server Status. In the latter window, you can activate tens of system monitors, and you can set how often they should run and to which email address they should send updates and warnings.
Speaking of automated actions, the most useful part of Webmin might be its interface to set up and control cron jobs – that is, automatic execution of specific commands or scripts at regular intervals. From the visual point of view, the form in System | Scheduled Cron Jobs might be outdated, but it makes it very, very easy to create cron jobs that run only when you want. You can even specify a non-recurring range of dates in which each job should be executed and define which users can have their own cron jobs.
Firewall and Servers
The most critical part of the Networking section is probably the configuration of your firewall. By default, Webmin includes two modules for firewall configuration, called FirewallD and Linux Firewall. Which one is more appropriate depends on which distribution you are running. Luckily, Webmin is smart enough to advise you, in most cases, which you should use.
Out of the box, Webmin knows how to configure the servers corresponding to the essential services of any Linux system: remote access via SSH; websites with Apache; databases with MySQL; and email with Postfix, Procmail, and SpamAssassin. Many more servers, from DNS to DHCP, have separate modules that you can activate with a few clicks.
On one hand, this part of Webmin is the least useful: This is not Webmin's fault, it's just the nature of the beast. Regardless of which flavor of Linux you use, any configuration interface for services like running websites or email can only do so much for its users. Webmin has many practical forms that help a lot – and save lots of time – to set each variable of those servers; however, it's still up to you to know what those variables mean.
Beyond the GUI: Advanced Webmin Usage
No software interface is really useful if you cannot customize at least part of it to your specific needs or occasionally do something that is not specifically listed in its menus. Webmin provides several functions that make these things possible even without hacking its source code.
To execute a command that you would otherwise have to enter at a shell prompt, click on Others | Command Shell and type the command. To do serious terminal work, choose Others | Text Login (Figure 4). This option opens a terminal inside your browser in which you can run all the commands and scripts you want inside a secure SSH session. If there's a command that you want to assign to a clickable button for frequent use, add it in the Others | Custom Commands page shown in Figures 5 and 6.
![](/var/linux_magazin/storage/images/issues/2016/190/webmin/figure-5/675961-1-eng-US/Figure-5_large.png)
![](/var/linux_magazin/storage/images/issues/2016/190/webmin/figure-6/675964-1-eng-US/Figure-6_large.png)
These features alone make Webmin flexible enough for most users, but there is more: If you want to save even more time, you can write Perl scripts that will use Webmin on your behalf, using the XML Remote Procedure Call protocol. To understand how this trick works, look at Listing 1, which shows the essential parts of one of the sample scripts provided by the Webmin developers [5]. This script connects to your Webmin with the credentials in the single line of a file called url.txt
(line 1), which has the following format:
Listing 1
Using Webmin from a Perl Script
https://USERNAME:PASSWORD@yourserver.com:10000/xmlrpc.cgi
Lines 2 to 6 create an object that connects to the specified Webmin instance. Using the cron::list_cron_jobs
method, lines 7 to 10 check whether a cron job that executes the command echo foo
as user root
already exists. If yes, it is deleted (remember, this is just an example). Otherwise (lines 17 to 25), the server object is told to connect to Webmin again to create the cron job with the specified parameters. Of course, in real life, the user
and command
terms specified in the script would be parameters passed to the script.
« Previous 1 2 3 4 Next »
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
![Learn More](https://www.linux-magazine.com/var/linux_magazin/storage/images/media/linux-magazine-eng-us/images/misc/learn-more/834592-1-eng-US/Learn-More_medium.png)
News
-
NVIDIA Released Driver for Upcoming NVIDIA 560 GPU for Linux
Not only has NVIDIA released the driver for its upcoming CPU series, it's the first release that defaults to using open-source GPU kernel modules.
-
OpenMandriva Lx 24.07 Released
If you’re into rolling release Linux distributions, OpenMandriva ROME has a new snapshot with a new kernel.
-
Kernel 6.10 Available for General Usage
Linus Torvalds has released the 6.10 kernel and it includes significant performance increases for Intel Core hybrid systems and more.
-
TUXEDO Computers Releases InfinityBook Pro 14 Gen9 Laptop
Sporting either AMD or Intel CPUs, the TUXEDO InfinityBook Pro 14 is an extremely compact, lightweight, sturdy powerhouse.
-
Google Extends Support for Linux Kernels Used for Android
Because the LTS Linux kernel releases are so important to Android, Google has decided to extend the support period beyond that offered by the kernel development team.
-
Linux Mint 22 Stable Delayed
If you're anxious about getting your hands on the stable release of Linux Mint 22, it looks as if you're going to have to wait a bit longer.
-
Nitrux 3.5.1 Available for Install
The latest version of the immutable, systemd-free distribution includes an updated kernel and NVIDIA driver.
-
Debian 12.6 Released with Plenty of Bug Fixes and Updates
The sixth update to Debian "Bookworm" is all about security mitigations and making adjustments for some "serious problems."
-
Canonical Offers 12-Year LTS for Open Source Docker Images
Canonical is expanding its LTS offering to reach beyond the DEB packages with a new distro-less Docker image.
-
Plasma Desktop 6.1 Released with Several Enhancements
If you're a fan of Plasma Desktop, you should be excited about this new point release.