Inventariar un equipo Linux
Wednesday, March 23, 2011 5:44:23 AM
la ruta donde todo se encuentra fácil: "/proc" que hay ahi simple:
[juliuss@Pinky ~]$ ls /proc/ 1/ 12/ 170/ 2118/ 2528/ 2947/ 3452/ 3781/ 3867/ 442/ 6/ 78/ 966/ dma kcore mounts@ sys/ 10/ 1222/ 18/ 2175/ 2544/ 2967/ 35/ 3782/ 3881/ 443/ 60/ 79/ 967/ dri/ keys mtrr sysrq-trigger 101/ 1228/ 1872/ 22/ 2582/ 3/ 3694/ 3785/ 3882/ 444/ 61/ 8/ 968/ driver/ key-users net@ sysvipc/ 1061/ 1245/ 19/ 2238/ 26/ 30/ 3756/ 3791/ 3883/ 4465/ 63/ 80/ acpi/ execdomains kmsg pagetypeinfo timer_list 1062/ 1251/ 1980/ 2246/ 2632/ 31/ 3759/ 3793/ 3889/ 48/ 64/ 831/ asound/ fb kpagecount partitions timer_stats 1067/ 13/ 1987/ 2248/ 2635/ 3112/ 3760/ 3836/ 4/ 487/ 67/ 9/ buddyinfo filesystems kpageflags sched_debug tty/ 1068/ 14/ 2/ 2258/ 2689/ 3353/ 3762/ 3838/ 413/ 49/ 68/ 927/ bus/ fs/ latency_stats schedstat uptime 1087/ 15/ 20/ 2279/ 27/ 3445/ 3763/ 3840/ 4210/ 491/ 7/ 928/ cmdline ide/ loadavg scsi/ version 1088/ 16/ 2008/ 2416/ 2794/ 3447/ 3766/ 3846/ 4215/ 494/ 711/ 929/ config.gz interrupts locks self@ vmallocinfo 1098/ 1608/ 2009/ 2480/ 2797/ 3448/ 3772/ 3854/ 4231/ 497/ 715/ 930/ cpuinfo iomem mdstat slabinfo vmstat 11/ 1616/ 2014/ 25/ 28/ 3449/ 3775/ 3855/ 4237/ 5/ 748/ 959/ crypto ioports meminfo softirqs zoneinfo 1101/ 1632/ 2015/ 2511/ 2814/ 3450/ 3778/ 3863/ 4238/ 50/ 764/ 961/ devices irq/ misc stat 1178/ 17/ 21/ 2512/ 29/ 3451/ 3779/ 3866/ 441/ 59/ 766/ 962/ diskstats kallsyms modules swaps [juliuss@Pinky ~]$
Pero que tanto se ve ahí pues es sencillo:
meminfo - te brinda datos sobre la memoria
cpuinfo - información sobre el microprocesador que estas usando
partitions - las particiones de tu sistema
version - que versión de lunux tienes instalada
entre algunos otros, pero estos ayudan mucho... ahora que si lo que quieres es generar un archivo con toda esa información podrías hacerlo así:
[root@Pinky proc]# cat cpuinfo meminfo swaps version > /home/juliuss/inventario.txt
Y luego podrías leerlo de esta forma:
[root@Pinky proc]# cat /home/juliuss/inventario.txt processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 15 model name : Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz stepping : 6 cpu MHz : 1596.000 cache size : 4096 KB physical id : 0 siblings : 2 core id : 0 cpu cores : 2 apicid : 0 initial apicid : 0 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 10 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm lahf_lm tpr_shadow bogomips : 4794.83 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management: processor : 1 vendor_id : GenuineIntel cpu family : 6 model : 15 model name : Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz stepping : 6 cpu MHz : 1596.000 cache size : 4096 KB physical id : 0 siblings : 2 core id : 1 cpu cores : 2 apicid : 1 initial apicid : 1 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 10 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm lahf_lm tpr_shadow bogomips : 4794.37 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management: MemTotal: 2070248 kB MemFree: 573472 kB Buffers: 68684 kB Cached: 971672 kB SwapCached: 0 kB Active: 502864 kB Inactive: 905048 kB Active(anon): 367848 kB Inactive(anon): 5128 kB Active(file): 135016 kB Inactive(file): 899920 kB Unevictable: 0 kB Mlocked: 0 kB HighTotal: 1189636 kB HighFree: 7936 kB LowTotal: 880612 kB LowFree: 565536 kB SwapTotal: 4192924 kB SwapFree: 4192924 kB Dirty: 8 kB Writeback: 0 kB AnonPages: 367800 kB Mapped: 126940 kB Shmem: 5424 kB Slab: 34060 kB SReclaimable: 21020 kB SUnreclaim: 13040 kB KernelStack: 2128 kB PageTables: 4272 kB NFS_Unstable: 0 kB Bounce: 0 kB WritebackTmp: 0 kB CommitLimit: 5228048 kB Committed_AS: 915456 kB VmallocTotal: 122880 kB VmallocUsed: 61936 kB VmallocChunk: 46860 kB HardwareCorrupted: 0 kB HugePages_Total: 0 HugePages_Free: 0 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 4096 kB DirectMap4k: 8184 kB DirectMap4M: 897024 kB Filename Type Size Used Priority /dev/sda7 partition 4192924 0 -1 Linux version 2.6.33.7-desktop-2mnb (qateam@titan.mandriva.com) (gcc version 4.4.3 (GCC) ) #1 SMP Mon Sep 20 19:00:25 UTC 2010 [root@Pinky proc]#
ya quedan algunas cosas pendientes como el ifconfig, gw, etc...






