Large files in /etc/webmin/virtual-server/history folder

9 posts / 0 new
Last post
#1 Thu, 06/23/2011 - 08:21
Murz

Large files in /etc/webmin/virtual-server/history folder

After some time I see that size of folder /etc/webmin/virtual-server/history goes too large, at now it more than 100Mb and size increases every time.
In this folder located those files:
aliases
bin
bout
cpuidle
cpuio
cpukernel
cpuuser
diskused
doms
load
load15
load5
mailcount
maxes
memused
netcounts
procmailpos
procs
quotalimit
quotaused
rx
spamcount
swapused
tx
users
viruscount

As I think, this files is used by some system statistics module, but I haven't find it. Where I can look history, that accumulated in this files?

Maybe it is available in Virtualmin Pro, but I use GPL version.

And why this history isn't clean-up old data? I see in this files first line of data dated as Wed, 25 Jun 2008! Where I can tune-up data store time?

And can I turn off collecting this data? I use another system for monitor system load (zabbix) and don't want to use unnecessary resources.

Thu, 06/23/2011 - 08:33
andreychek

Howdy,

Virtualmin does collect a lot of information... some of that is used in Virtualmin GPL, though Virtualmin Pro has a statistics module that takes full advantage of all of it.

In Virtualmin GPL, it's particularly useful in System Settings -> Bandwidth Monitoring.

However, all that information is collected by the "collectinfo.pl" program. If you really don't want any of those stats, you could always disable the collectinfo.pl cron job.

If you opt to do that -- you'll need to make sure you have another way of looking for package updates, as it's collectinfo.pl that determines if any package updates are available.

-Eric

Thu, 06/23/2011 - 09:15 (Reply to #2)
Murz

Bandwidth Monitoring are collected in another folder - /etc/webmin/virtual-server/bandwidth, but those files are in /etc/webmin/virtual-server/history folder.

I need bandwidth data and use it in GPL version.
And old bandwidth data are correctly purged, I see data only for last 1 year, that I set in settings.

How I can disable collecting only history data and stay here bandwidth data and other functions from collectinfo.pl?

Or maybe tune purging old data for history if there are no way to disable collecting it?

Thu, 06/23/2011 - 09:19
andreychek

Actually, that's a good point -- bandwidth is collected by "bw.pl", not "collectinfo.pl". Thanks for jogging my memory :-)

But that does mean that if you were to disable collectinfo, you'd still get your bandwidth stats.

As cheap as disk space is these days, most folks don't notice the disk space used by that history.

However, rather than disabling the service, you always have the option of deleting those history files.

What I'd recommend doing is moving the files in '/etc/webmin/virtual-server/history/' elsewhere, rather than deleting them, just to make sure nothing you needed changes.

After moving those, if everything in Virtualmin still looks good to you -- you could setup a monthly cron job to delete all that data.

-Eric

Thu, 06/23/2011 - 09:33 (Reply to #4)
Murz

I always can manually delete this files, or do it empty via cron job. But will be good to find the true way for do this :) Does Virtualmin Pro have feature for purging old data in history or it store all the data from first day?

And maybe Virtualmin Pro have option for disable collecting history and write some variable to config file? I think it must work in GPL version too. As I see in screenshot https://www.virtualmin.com/images/screenshots/graphs-thumb.png it located in bottom of left menu. Can you look in it option for disabling?

Disabling collecting are much better that manually deleting files via cron, because collecting this stat runs every minute and uses CPU.

Thu, 06/23/2011 - 09:51
andreychek

Howdy,

Does Virtualmin Pro have feature for purging old data in history or it store all the data from first day?

Nope! The Pro version doesn't handle that any differently. A Virtualmin Pro installation would have stats for the entire time it's been online.

I believe that in the 5 or so years that I've been in the forums here, that you're the first to mention that the space used by that directory is undesirable :-)

As far as disabling the cron job -- I was about to say that there wasn't a way to disable collectinfo from within Virtualmin, but it looks like there's an option in there for that now... if you go into System Settings -> Virtualmin Config -> Status Collection, you can set it to "Never Run".

-Eric

Fri, 11/04/2011 - 11:34
strategies

Hi there,

We're finding this problematic because we separate out our /, /usr, /var, /home and /tmp partitions. We keep a pretty low sized partition for /, which includes /etc, since this partition doesn't store a lot of large data, ordinarily. But because Virtualmin is storing log data in /etc we find after a time we get low on space on this partition.

It's a shame this data isn't stored in /var, rather than /etc. It doesn't seem possible to change the location, only to turn off logging entirely.

So, please add me to the list of people who are finding the space used by that directory undesirable. :)

Regards,

Nick.

Fri, 11/04/2011 - 12:07
andreychek

How much space is the /etc/webmin/virtual-server/history directory using on your system?

Fri, 11/04/2011 - 18:10
andreychek

Okay, so, there isn't a way to tell Virtualmin to store that data somewhere else.

However, you can set that up manually.

You can move the directories in question to /var/, and just make a symlink from /etc.

That is, you can do this:

mv /etc/webmin/virtual-server/history /var/webmin
ln -s /etc/webmin/virtual-server/history /var/webmin/history
Topic locked