El día 2 de mayo de 2009 22:31, Alex Infantes <alexandr...@gmail.com> escribió: > On Sábado 02 Mayo 2009 14:23:26 Reiniel Gonzalez Martinez escribió: >> Hola a t...@s, quisiera saber si existe algún comando que me dijera cuanta >> SWAP, CPU y RAM está utilizando mi servidor, en un determinado momento, no >> necesito ningún programa que me diga esto como htop por ejemplo solo los >> comandos....gracias de antemano > > Tal vez te sirva el comando > $ free -m > Para ver la cantidad de memoria > > y para ver solo el swap > $free -m | grep Swap > > Suerte > > Alex Infantes > > > -- > To UNSUBSCRIBE, email to debian-user-spanish-requ...@lists.debian.org > with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org > >
Lo que te dice Ales Infantes, si el comando te devuelve más cosas de las que necesitas, siempre puedes utilizar grep y cut, por ejemplo, salida del comando top: $ top -b -n 1 -p1: top - 00:02:39 up 8:19, 2 users, load average: 1.65, 4.12, 2.22 Tasks: 1 total, 0 running, 1 sleeping, 0 stopped, 0 zombie Cpu(s): 22.9%us, 3.0%sy, 0.0%ni, 73.0%id, 0.6%wa, 0.3%hi, 0.1%si, 0.0%st Mem: 2067096k total, 1187936k used, 879160k free, 144448k buffers Swap: 3068372k total, 0k used, 3068372k free, 540704k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1 root 20 0 2132 728 632 S 0 0.0 0:01.66 init Salida del comando top | grep Swap: $ top -b -n 1 -p1 | grep Swap: Swap: 3068372k total, 0k used, 3068372k free, 540704k cached Y por ejemplo, para quitar la palabra Swap: $ top -b -n 1 -p1 | grep Swap | cut -d: -f2-: 3068372k total, 0k used, 3068372k free, 540720k cached Puedes hacer maravillas ;). man grep y cut -- aabilio - http://linfox.es http://expulsionporagresion.linfox.es GPG id C7B08605 Abilio Almeida Eiroa (aabilio) -- To UNSUBSCRIBE, email to debian-user-spanish-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org