Christian Seiler: Ausgabe von "top" (Linux) mit PHP auslesen?

Beitrag lesen

Hallo Mulder,

Andere vergleichbare Tools (z.B. ColdFusion's "cfstat") funktionieren jedoch prima mit exec() oder passthru().

Du suchst

top -b -n1

Aus dem Manual: (man top)

-b : Batch mode operation
            Starts top in 'Batch mode', which could be useful for sending out-
            put from top to other programs or to a file.  In  this  mode,  top
            will  not  accept input and runs until the iterations limit you've
            set with the '-n' command-line option or until killed.

Viele Grüße,
Christian

--
| http://www.selflinux.org/                                                  |
| http://aktuell.de.selfhtml.org/tippstricks/beitrag.htm                      |
| sh:) fo:) ch:] rl:( br:> n4:& ie:% mo:) va:) de:] zu:) fl:( js:| ss:) ls:[ |
| http://emmanuel.dammerer.at/selfcode.html                                  |