[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-developers] raq4 memory problem... in php
- Subject: Re: [cobalt-developers] raq4 memory problem... in php
- From: "ToPPi" <ToPPi@xxxxxxxxx>
- Date: Tue Aug 20 06:48:02 2002
- List-id: Discussion Forum for developers on Sun Cobalt Networks products <cobalt-developers.list.cobalt.com>
it would be nice to run this in a php script..
has anyone of you an idea how to run the commands below in an php script and
show the result there?
> #!/bin/sh
> physical=`grep Mem: /proc/meminfo | awk '{print $2}'`
> used=`grep Mem: /proc/meminfo | awk '{print $3}'`
> buffers=`grep Mem: /proc/meminfo | awk '{print $6}'`
> cache=`grep Mem: /proc/meminfo | awk '{print $7}'`
> swapused=`grep Swap: /proc/meminfo | awk '{print $3}'`
> echo $(( $physical - $used + $cache + $buffers - $swapused ))
regards,
toppi