Resource usage not updating

Hi Jamie,

I just noticed this morning that sometime after Cloudmin 2.9 (might have been 3.0, but I didn't check and now I'm on 3.1) all of the Resource Usage collection has stopped.

When I goto Cloudmin Settings -> System Statistics Graphs it shows absolutely nothing and when I go in to edit a virtual machine and look in Resource usage it shows an uptime of 0 even though the machine is up and running.

Accounting period Current month
System uptime over period 00 minutes, 00 seconds (0% of period)

Here's the crontab for root from my cloudmin system

49 23 * * * /etc/webmin/cron/tempdelete.pl
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /etc/webmin/server-manager/status.pl
39 * * * * /etc/webmin/server-manager/licence.pl
2,7,12,17,22,27,32,37,42,47,52,57 * * * * /etc/webmin/server-manager/bandwidth.pl
8 10 * * * /etc/webmin/server-manager/space.pl

Let me know what else I can provide you to track this down.

Thanks!

Status: 
Active

Comments

Looks like it is still working OK on my test systems ..

If you run /etc/webmin/server-manager/status.pl as root at the shell, does it output any errors?

Also, how long does it take?

Finally, do the statistics graphs show anything for any system, such as the non-virtual ones?

Well, well, well...

(#169:1u:0r:0s) root@yyz1-cloud[/U/evan]: /etc/webmin/server-manager/status.pl
bash: /etc/webmin/server-manager/status.pl: No such file or directory

I guess that explains it. I guess that also means that I'm not getting root mail from my cloudmin system...

I fixed up the root mail issue and sure enough every 5 mins I get Cron output about collectinfo.pl & status.pl.

Here's the output of my /etc/webmin/server-manager directory:

(#220:1u:0r:0s) root@yyz1-cloud[/e/w/server-manager]: ls -al
total 104
drwx--x--x   9 root bin  4096 Sep  8 16:00 .
drwxr-xr-x 123 root root 4096 Sep  8 16:00 ..
drwx------   2 root root 4096 Sep  8 16:02 bandwidth
-rwxr-xr-x   1 root root  352 Jul 31 22:46 bandwidth.pl
-rw-r--r--   1 root root  346 Jul 31 22:46 bw-template
drwx------   2 root root 4096 Sep  8 16:00 coll
-rw-------   1 root bin   646 Sep  8 16:00 config
drwx------   2 root root 4096 Sep  8 16:00 domains
drwx------  29 root root 4096 Sep  7 01:17 history
-rw-r--r--   1 root root  410 Sep  8 12:47 indusblue.acl
-rw-r--r--   1 root root   48 Sep  6 15:16 installtimes
-rw-r--r--   1 root root   95 Sep  6 15:18 licence-cache
-rw-r--r--   1 root root   59 Sep  6 15:15 licence-status
-rwxr-xr-x   1 root root  344 Sep  7 01:38 login.pl
-rw-r--r--   1 root root  413 Jul 31 22:46 owner-bw-template
drwx------   2 root root 4096 Sep  8 16:00 plans
-rw-r--r--   1 root root    9 Sep  7 01:17 progress-licences
drwx------   2 root root 4096 Aug 11 17:09 seenfeatures
-rw-r--r--   1 root root   44 Sep  6 15:18 serial-cache
-rw-r--r--   1 root root 9374 Aug 26 14:05 server-images-cache
-rwxr-xr-x   1 root root  344 Aug 26 13:51 space.pl
-rw-r--r--   1 root root  190 Sep  8 16:00 this
drwx------   2 root root 4096 Aug 26 13:50 usage
-rw-r--r--   1 root root  165 Aug 26 13:35 xen-cpu-seconds

When I initially installed Cloudmin there wasn't an install script for Debian/Ubuntu so I did it by hand (and it installed into /usr/local/webmin). Thinking that using the new script might help I decided to backup my /etc/webmin directory and go through the install script.

The script bombed out at this point:

Installing Cloudmin packages using APT ..
Reading package lists... Done
Building dependency tree      
Reading state information... Done
webmin is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 29 not upgraded.
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following NEW packages will be installed:
  webmin-security-updates webmin-server-manager webmin-virtual-server-mobile webmin-virtual-server-theme
0 upgraded, 4 newly installed, 0 to remove and 29 not upgraded.
Need to get 3704kB of archives.
After this operation, 49.6MB of additional disk space will be used.
Get:1 http://cloudmin.virtualmin.com binary/ webmin-security-updates 3.6 [23.1kB]
Get:2 http://cloudmin.virtualmin.com binary/ webmin-server-manager 3.1 [1398kB]
Get:3 http://cloudmin.virtualmin.com binary/ webmin-virtual-server-mobile 2.3 [65.2kB]
Get:4 http://cloudmin.virtualmin.com binary/ webmin-virtual-server-theme 7.4 [2218kB]
Fetched 3704kB in 4s (751kB/s)                       
Selecting previously deselected package webmin-security-updates.
(Reading database ... 39326 files and directories currently installed.)
Unpacking webmin-security-updates (from .../webmin-security-updates_3.6_all.deb) ...
This Webmin module is already installed on your system.
dpkg: error processing /var/cache/apt/archives/webmin-security-updates_3.6_all.deb (--unpack):
subprocess pre-installation script returned error exit status 1
Selecting previously deselected package webmin-server-manager.
Unpacking webmin-server-manager (from .../webmin-server-manager_3.1_all.deb) ...
This Webmin module is already installed on your system.
dpkg: error processing /var/cache/apt/archives/webmin-server-manager_3.1_all.deb (--unpack):
subprocess pre-installation script returned error exit status 1
Selecting previously deselected package webmin-virtual-server-mobile.
Unpacking webmin-virtual-server-mobile (from .../webmin-virtual-server-mobile_2.3_all.deb) ...
This Webmin module is already installed on your system.
dpkg: error processing /var/cache/apt/archives/webmin-virtual-server-mobile_2.3_all.deb (--unpack):
subprocess pre-installation script returned error exit status 1
Selecting previously deselected package webmin-virtual-server-theme.
Unpacking webmin-virtual-server-theme (from .../webmin-virtual-server-theme_7.4_all.deb) ...
Errors were encountered while processing:
/var/cache/apt/archives/webmin-security-updates_3.6_all.deb
/var/cache/apt/archives/webmin-server-manager_3.1_all.deb
/var/cache/apt/archives/webmin-virtual-server-mobile_2.3_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
.. install failed

I blew away /usr/share/webmin/{server-manager,virtual-server-mobile,security-updates} and re-ran the install script. It completed without any errors and my Cloudmin is still usable via the http interface but the status.pl & collectinfo.pl scripts still do not exist in /etc/webmin/server-manager.

Next steps?

It looks like those scripts aren't being created as Cloudmin's installer is still seeing the cron jobs.

The fix is to remove the cron jobs for status.pl and collectinfo.pl , then run :

cd /usr/share/webmin
export WEBMIN_CONFIG=/etc/webmin
export WEBMIN_VAR=/var/webmin
/usr/share/webmin/postinstall.pl server-manager

You don't need the collectinfo.pl script, as that is part of Virtualmin and not Cloudmin.

I don't seem to have a postinstall.pl in /usr/share/webmin...

(#248:1u:0r:0s) root@yyz1-cloud[/u/s/webmin]: cd /usr/share/webmin
(#249:1u:0r:0s) root@yyz1-cloud[/u/s/webmin]: export WEBMIN_CONFIG=/etc/webmin
(#250:1u:0r:0s) root@yyz1-cloud[/u/s/webmin]: export WEBMIN_VAR=/var/webmin
(#251:1u:0r:0s) root@yyz1-cloud[/u/s/webmin]: /usr/share/webmin/postinstall.pl server-manager
bash: /usr/share/webmin/postinstall.pl: No such file or directory

Sorry, the commands should be :

cd /usr/share/webmin
export WEBMIN_CONFIG=/etc/webmin
export WEBMIN_VAR=/var/webmin
/usr/share/webmin/run-postinstalls.pl server-manager

However, since you sent me the new Cloudmin with the new bridge support (which is great, btw) I removed the cron entries and then ran dpkg -i on the new .deb file again.

The cron entries are back and the status.pl script exists again.

(#262:1u:0r:0s) root@yyz1-cloud[/U/evan]: crontab -l
49 23 * * * /etc/webmin/cron/tempdelete.pl
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /etc/webmin/server-manager/status.pl
10 * * * * /etc/webmin/server-manager/licence.pl
58 18 * * * /etc/webmin/server-manager/space.pl
(#263:1u:0r:0s) root@yyz1-cloud[/U/evan]: ls -al /etc/webmin/server-manager/status.pl
-rwxr-xr-x 1 root root 346 Sep  8 16:37 /etc/webmin/server-manager/status.pl

Yes, that would work too ..