Here a better formatted version.
#!/usr/bin/perl
@jails = `jls`;
$title = shift @jails;
chomp $title;
print $title . "\t\t%CPU\t%MEM\n";
foreach (@jails)
{
my ($jid) = /\s+(\S+)\s/;
@jexec = `jexec $jid ps -afxu`;
@mem = map {/\S+\s+\S+\s+\S+\s+(\S+)\s/} @jexec;
shift @mem;
$tot_mem = 0
[EMAIL PROTECTED] wrote:
> On Aug 15, 2006, at 9:16 AM, Philippe Lang wrote:
>
>> Hi,
>>
>> Based on answers of my first post, I wrote a small perl script in
>> order to find out the CPU and MEMORY used by each jail.
>> Here it is:
>>
>> --
>>
On Aug 15, 2006, at 9:16 AM, Philippe Lang wrote:
Hi,
Based on answers of my first post, I wrote a small perl script in
order to find out the CPU and MEMORY used by each jail.
Here it is:
--
- jls.ps
--
Hi,
Based on answers of my first post, I wrote a small perl script in order to find
out the CPU and MEMORY used by each jail.
Here it is:
--
- jls.ps
--
#!/usr/bin/perl
@jails = `jls`;
$title
Philippe Lang <[EMAIL PROTECTED]> wrote:
> I'd like to use Cacti for CPU and RAM usage monitoring on my FreeBSD
> Server.
>
> Is there a way to do monitoring for each jail independently? I guess
> the answer is "no" for CPU usage, but is there a way maybe to get the
> RAM usage of the process
On Aug 14, 2006, at 10:28 AM, pete wright wrote:
On 8/14/06, Philippe Lang <[EMAIL PROTECTED]> wrote:
Hi,
I'd like to use Cacti for CPU and RAM usage monitoring on my
FreeBSD Server.
Is there a way to do monitoring for each jail independently? I
guess the answer is "no" for CPU usage, b
On 8/14/06, Philippe Lang <[EMAIL PROTECTED]> wrote:
Hi,
I'd like to use Cacti for CPU and RAM usage monitoring on my FreeBSD Server.
Is there a way to do monitoring for each jail independently? I guess the answer is
"no" for CPU usage, but is there a way maybe to get the RAM usage of the
pro
Hi,
I'd like to use Cacti for CPU and RAM usage monitoring on my FreeBSD Server.
Is there a way to do monitoring for each jail independently? I guess the answer
is "no" for CPU usage, but is there a way maybe to get the RAM usage of the
processes of each jail?
Thanks,
---
Philippe