uname muestra info basica del sistema (Linux - nombre del equipo - kernel - etc)
root@CFH:~# uname -a
Linux CFH 2.6.35-30-generic #56-Ubuntu SMP Mon Jul 11 20:00:22 UTC 2011 i686 GNU/Linux
root@CFH:~#
####################### fdisk ##############################
Permite ver,manipular o crear particiones. Aunque una muy buena herramienta es fdisk -l (list)
root@CFH:~# fdisk -l
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00046a1a
Device Boot Start End Blocks Id System
/dev/sda1 * 1 280 2244608 82 Linux swap / Solaris
Partition 1 does not end on cylinder boundary.
/dev/sda2 280 19458 154043393 5 Extended
/dev/sda5 280 7210 55662592 83 Linux
/dev/sda6 7210 7222 96256 83 Linux
/dev/sda7 7222 19458 98282496 83 Linux
root@CFH:~#
############ free ############
permite ver el estado de la memoria ram y la swap
root@CFH:~# free -m
total used free shared buffers cached
Mem: 1980 1831 149 0 224 844
-/+ buffers/cache: 762 1218
Swap: 2191 0 2191
root@CFH:~#
Mem: es la memoria RAM física. En este caso tiene 2Gb (no tengo vga por eso toma un poco de ram)
Swap: es la memoria que usa el sistema cuando no le alcanza la ram, si esta aumenta en la columna "used" tenemos un serio probelma de rendimiento.
############ df ############
muestra el uso de espacio en disco. ( -h formato Humano, es decir, lo coloca en Mb Gb Tb)
root@CFH:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda5 53G 35G 16G 70% /
none 985M 224K 985M 1% /dev
none 991M 7.8M 983M 1% /dev/shm
none 991M 468K 990M 1% /var/run
none 991M 0 991M 0% /var/lock
/dev/sda6 92M 58M 30M 67% /boot
/dev/sda7 93G 50G 38G 57% /home
root@CFH:~#
############ lspci ############
lista los dispositivos PCI que tiene nuestro equipo.
root@CFH:~# lspci
00:00.0 Host bridge: nVidia Corporation Device 07c3 (rev a2)
00:00.1 RAM memory: nVidia Corporation nForce 630i memory controller (rev a2)
00:03.1 SMBus: nVidia Corporation MCP73 SMBus (rev a1)
00:0c.0 PCI bridge: nVidia Corporation MCP73 PCI Express bridge (rev a1)
00:0f.0 Ethernet controller: nVidia Corporation MCP73 Ethernet (rev a2)
00:10.0 VGA compatible controller: nVidia Corporation C73 [GeForce 7050 / nForce 610i] (rev a2)
01:07.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8185 IEEE 802.11a/b/g Wireless LAN Controller (rev 20)
root@CFH:~#
lsusb es lo mismo que lo anterior pero para ver los usb que tiene nuestro equipo
root@CFH:~# lsusb
Bus 002 Device 002: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@CFH:~#
############ lshw ############
Muestra informacion detallada de todo el hardware del equipo.
root@CFH:~# lshw
-t = --type TYPE podemos especificar que nos muestre espesificamente algo ej. motherboard
CFH
description: Desktop Computer
version: 1.0
width: 32 bits
capabilities: smbios-2.3 dmi-2.3 smp-1.4 smp
configuration: boot=normal chassis=desktop cpus=1 family=To Be Filled By O.E.M. sku=To Be Filled By O.E.M. uuid=00020003-0004-0005-0006-000700080009
*-core
description: Motherboard
product: MS-7228
vendor: To be filled by O.E.M.
physical id: 0
version: 1.0
serial: To be filled by O.E.M.
slot: To Be Filled By O.E.M.
*-firmware
description: BIOS
vendor: American Megatrends Inc.
physical id: 0
version: 080012
date: 01/23/2006
size: 64KiB
capacity: 448KiB
capabilities: isa pci pnp apm upgrade shadowing escd cdboot bootselect socketedrom edd int13floppy1200 int13floppy720 int13floppy2880 int5printscreen int9keyboard int14serial int17printer int10video acpi usb ls120boot zipboot biosbootspecification
*-cpu:0
description: CPU
product: AMD Athlon(tm) 64 Processor 3000+
vendor: Hynix Semiconductor (Hyundai Electronics)
physical id: 1
bus info: cpu@0
version: 15.4.10
serial: To Be Filled By O.E.M.
slot: CPU 1
size: 2GHz
capacity: 2GHz
width: 64 bits
clock: 200MHz
############ dmidecode ############
Es un poco mas completo que lshw
Permite conocer EXACTAMENTE el hardware de nuestro equipo, tal como se muestra en el BIOS. Muestra: El fabricante del Sistema, Modelo Exacto , número de serie, versión del BIOS ,Memorias, Cuanta Memoria soporta ,Modelo de Memoria,Modulo,Procesador, etc etc.
root@CFH:~# dmidecode
dmidecode --type baseboard = mostrara info del mother
bios
system
baseboard
chas‐sis
processor
memory
cache
connector
slot
############ mpstat ############
muestra el estado de nuestros procesadores, (es una manera rapida y facil para ver que quernel tenemos, cuantos cpus tenemos y que arquitectura tiene.)
root@CFH:~# mpstat
Linux 2.6.35-30-generic (CFH) 08/30/2011 _i686_ (1 CPU)
06:14:39 PM CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle
06:14:39 PM all 11.69 0.62 3.46 1.17 0.00 0.15 0.00 0.00 82.91
root@CFH:~#
############ W ############
nos muestra las terminales abiertas y que hacemos en ellas
jonathan@CFH:~$ w
19:23:01 up 2 days, 8:16, 6 users, load average: 0.04, 0.14, 0.29
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
jonathan tty7 :0 Tue11 2days 1:51m 17.83s gnome-session
jonathan pts/0 :0.0 18:04 52:07 0.34s 0.13s ssh root@192.168.1.254
jonathan pts/1 :0.0 18:21 0.00s 0.27s 0.00s w
jonathan pts/2 :0.0 Tue14 2:35m 0.63s 0.31s /bin/bash
jonathan pts/3 :0.0 19:22 5.00s 0.20s 0.00s ping www.google.com.ar
jonathan pts/4 :0.0 15:29 1:46m 0.46s 0.22s /bin/bash
jonathan@CFH:~$
last y lastb = last muestra un listado de los últimos usuarios logueados al sistema e información relevante, lastb last bad, muestra los últimos intentos de logueo al sistema que fracasaron, utilísimo para determinar posibles intentos de acceso ilegítimo al sistemo
root@CFH:~# last
jonathan pts/0 :0.0 Mon Aug 29 12:57 still logged in
jonathan pts/0 :0.0 Mon Aug 29 11:54 - 11:54 (00:00)
jonathan pts/0 :0.0 Mon Aug 29 10:35 - 10:36 (00:01)
jonathan tty7 :0 Mon Aug 29 10:34 still logged in
reboot system boot 2.6.35-30-generi Mon Aug 29 10:33 - 17:50 (1+07:16)
jonathan pts/1 :0.0 Fri Aug 26 17:24 - 20:03 (02:38)
Con lastb obtenemos los intentos de logueo que fracasaron.
############ TOP ############
muestra los procesos, de todos los usuarios, que estan corriendo en el sistema ( lo interesante de esto es poner el siguiente comando top -u pepito lista solo los procesos del usuario pepito)
jonathan@CFH:~$ top
top - 17:59:11 up 1 day, 7:25, 5 users, load average: 0.06, 0.11, 0.13
Tasks: 176 total, 2 running, 174 sleeping, 0 stopped, 0 zombie
Cpu(s): 11.7%us, 3.5%sy, 0.6%ni, 82.9%id, 1.2%wa, 0.0%hi, 0.1%si, 0.0%st
Mem: 2028144k total, 1808168k used, 219976k free, 232660k buffers
Swap: 2244604k total, 4k used, 2244600k free, 917148k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
19200 jonathan 20 0 588m 221m 33m R 5.9 11.2 67:40.15 firefox-bin
1047 root 20 0 113m 66m 13m S 2.0 3.4 53:19.28 Xorg
25849 jonathan 20 0 328m 61m 30m S 2.0 3.1 6:07.03 rhythmbox
1 root 20 0 3012 1780 1216 S 0.0 0.1 0:00.42 init
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
3 root 20 0 0 0 0 S 0.0 0.0 0:04.58 ksoftirqd/0
4 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/0
############ PS ############
este comando es muy parecido al top, pero no muestra en tiempo real. (si buscan en el man ps tienen un monton de convinaciones muy interesantes, para mi la mas interesante y la que uso a diario es )
root@CFH:~# ps fuax
jonathan 4448 0.0 1.8 155928 36584 ? Sl Aug29 1:00 konsole
jonathan 4451 0.0 0.1 7368 4032 pts/0 Ss Aug29 0:00 \_ /bin/bash
jonathan 4490 0.0 0.1 12924 3360 pts/0 S+ Aug29 0:00 | \_ ssh root@cfh
jonathan 24011 0.0 0.1 7368 4032 pts/2 Ss Aug29 0:00 \_ /bin/bash
root 6976 0.0 0.0 5412 1560 pts/2 S 18:03 0:00 | \_ su
root 6985 0.0 0.0 5376 1996 pts/2 S 18:03 0:00 | \_ bash
root 7154 0.0 0.0 4536 1456 pts/2 S+ 18:06 0:00 | \_ man ps
root 7163 0.0 0.0 4240 832 pts/2 S+ 18:06 0:00 | \_ pager -s
jonathan 26799 0.0 0.2 7380 4104 pts/1 Ss Aug29 0:00 \_ /bin/bash
root 10597 0.0 0.0 5412 1560 pts/1 S 11:03 0:00 | \_ su
root 10605 0.0 0.1 5548 2192 pts/1 S 11:03 0:00 | \_ bash
root 7321 0.0 0.0 4704 1088 pts/1 R+ 18:08 0:00 | \_ ps fuax
jonathan 31641 0.0 0.1 7368 4032 pts/5 Ss Aug29 0:00 \_ /bin/bash
root 31913 0.0 0.0 5412 1560 pts/5 S Aug29 0:00 \_ su
root 31924 0.0 0.1 5376 2044 pts/5 S+ Aug29 0:00 \_ bash
jonathan 8579 0.0 1.4 149652 29356 ? Sl Aug29 0:11 /usr/lib/totem/totem-plugin-viewer --plugin-type cone --user-a
jonathan 9609 0.0 0.1 7452 2372 ? S Aug29 0:00 /usr/lib/gvfs/gvfsd-burn --spawner :1.9 /org/gtk/gvfs/exec_spa
jonathan 19200 4.3 11.0 586024 224704 ? Sl Aug29 68:34 /usr/lib/firefox-3.6.20/firefox-bin
root 27803 0.0 0.0 5412 1560 ? S Aug29 0:00 su
root 27814 0.0 0.0 5376 1924 ? S Aug29 0:00 \_ bash
root 27833 0.0 0.1 5112 2200 ? S Aug29 0:00 \_ ssh root@192.168.1.254
root 2462 0.0 0.0 33300 1236 ? S Aug29 0:00 /usr/sbin/postfix-policyd -c /etc/postfix-policyd.conf
jonathan 25849 3.2 3.1 336488 62876 ? Sl 14:50 6:26 rhythmbox
-f = full format o formato completo, muestra con las barritas
-u = user muestra el usuario que lo esta corriendo con su id
-a = all muestra todos los procesos
-x = no recuerdo, chequear en man ps :P
No hay comentarios:
Publicar un comentario