LPIC-1 Linux Institute Professional
Zacząłem już jakiś czas temu przygotowania do tegoż certyfikatu, więc w ramach przypomnień i zrobienia krótkich notatek zamierzam zamieszczać tutaj swoje przemyślenia i informacje.
System Architecture
Detectable Hardware
Linux bazuje na Hardware Abstraction Layer która to zawiera cztery podstawowe komponenty:
- sysfs - virtual filesystem - tworzy go katalog /sys/ w raz z podkatalogami:
- block/ - sterownik dla urządzeń blokowych
- class/ - dla klas urządzeń
- devices/ - dla hierarchii wykrytych urządzeń
- firmware/ - dla sterowników
- modules/ - dla załadowanych modułów w Kernel
- udev - Kernel devices manager, sprawdza połączenia pomiędzy "zdarzeniami" a urządzeniami czyli np. jeśli mamy zamontowany pendrive i chcemy go od montować udev usuwa pliki, które powstały na skutek montowania tego urządzenia lub też tworzy takie pliki kiedy montujemy.
- hald - utrzymuje bazę danych z aktualnym sprzętem (działa jako deamon)
- dbus - jest to proces który jest użyteczny w wykrywaniu urządzeń używających IPC (Interprocess Comunication), umożliwia np. automatyczne zamontowanie pendriva lub innego urządzenia
Dla Ubuntu (debain)
- nonus25@localhost:~$ ls -lo /sys/
- total 0
- drwxr-xr-x 2 root 0 2012-02-01 20:14 block
- drwxr-xr-x 20 root 0 2012-02-01 20:14 bus
- drwxr-xr-x 41 root 0 2012-02-01 20:14 class
- drwxr-xr-x 4 root 0 2012-02-01 20:14 dev
- drwxr-xr-x 10 root 0 2012-02-01 20:02 devices
- drwxr-xr-x 4 root 0 2012-02-01 20:14 firmware
- drwxr-xr-x 6 root 0 2012-02-01 20:10 fs
- drwxr-xr-x 6 root 0 2012-02-01 20:02 kernel
- drwxr-xr-x 105 root 0 2012-02-01 20:14 module
- drwxr-xr-x 2 root 0 2012-02-01 20:14 power
Dla CentOS (wersja RedHat'a dla ubogich)
- [nonus25@localhost ~]$ ls -lo /sys/
- total 0
- drwxr-xr-x 31 root 0 Jan 29 21:07 block
- drwxr-xr-x 15 root 0 Jan 29 21:08 bus
- drwxr-xr-x 36 root 0 Jan 29 21:08 class
- drwxr-xr-x 15 root 0 Jan 29 21:07 devices
- drwxr-xr-x 3 root 0 Jan 29 21:07 firmware
- drwxr-xr-x 2 root 0 Jan 29 21:07 fs
- drwxr-xr-x 4 root 0 Jan 29 21:08 kernel
- drwxr-xr-x 138 root 0 Jan 29 21:09 module
- drwxr-xr-x 2 root 0 Jan 29 21:08 power
Pokrewnym katalogowi sys/ jest katalog proc/ dla dynamicznych ustawień. Zapewnia on dynamiczny dostęp do informacji na twardym dysku i do kernel, poniżej wynik polecenia /proc/cpuinfo dla obu dystrybucji zainstalowanych na VirtualBox'ie
Dla Ubuntu (debain)
- nonus25@localhost:~$ cat /proc/cpuinfo
- processor : 0
- vendor_id : GenuineIntel
- cpu family : 6
- model : 23
- model name : Intel(R) Core(TM)2 Duo CPU P8600 @ 2.40GHz
- stepping : 6
- cpu MHz : 2395.160
- cache size : 6144 KB
- fdiv_bug : no
- hlt_bug : no
- f00f_bug : no
- coma_bug : no
- fpu : yes
- fpu_exception : yes
- cpuid level : 5
- wp : yes
- flags : fpu vme de pse tsc msr mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 constant_tsc up pni monitor ssse3
- bogomips : 4790.32
- clflush size : 64
- cache_alignment : 64
- address sizes : 36 bits physical, 48 bits virtual
- power management:
Dla CentOS (wersja RedHat'a dla ubogich)
- [nonus25@localhost ~]$ cat /proc/cpuinfo
- processor : 0
- vendor_id : GenuineIntel
- cpu family : 6
- model : 23
- model name : Intel(R) Core(TM)2 Duo CPU P8600 @ 2.40GHz
- stepping : 6
- cpu MHz : 2395.466
- cache size : 3072 KB
- physical id : 0
- siblings : 1
- core id : 0
- cpu cores : 1
- apicid : 0
- fdiv_bug : no
- hlt_bug : no
- f00f_bug : no
- coma_bug : no
- fpu : yes
- fpu_exception : yes
- cpuid level : 5
- wp : yes
- flags : fpu vme de pse tsc msr mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 constant_tsc up pni monitor ssse3
- bogomips : 4790.93
Przeglądając katalog proc/ możemy znaleźć wiele przydatnych informacji o stanie naszego systemu, przede wszystkim polecenia które należy przejrzeć i się z nimi zapoznać to: /proc/modules
, /proc/mounts
, /proc/meminfo
/proc/modules
Ubuntu:
- nonus25@localhost:~$ cat /proc/modules
- btrfs 459002 0 - Live 0xe24b1000
- zlib_deflate 19568 1 btrfs, Live 0xe2415000
- crc32c 2519 1 - Live 0xe2408000
- libcrc32c 875 1 btrfs, Live 0xe23fe000
- ufs 72774 0 - Live 0xe23e3000
- qnx4 6484 0 - Live 0xe23c3000
- hfsplus 70800 0 - Live 0xe23a4000
- hfs 40754 0 - Live 0xe237a000
- minix 25197 0 - Live 0xe235b000
- ntfs 94791 0 - Live 0xe232f000
- vfat 8933 0 - Live 0xe2305000
- msdos 6392 0 - Live 0xe22fa000
- fat 47767 2 vfat,msdos, Live 0xe22ec000
- jfs 172682 0 - Live 0xe205b000
- xfs 515548 0 - Live 0xe1fa1000
- exportfs 3437 1 xfs, Live 0xe08ed000
- reiserfs 225539 0 - Live 0xe1ec9000
- nls_utf8 1069 1 - Live 0xe0977000
- isofs 29250 1 - Live 0xe1a6d000
- vboxvideo 1228 2 - Live 0xe0888000
- drm 162377 3 vboxvideo, Live 0xe1a25000
- agpgart 31724 1 drm, Live 0xe1a04000
- binfmt_misc 6587 1 - Live 0xe0884000
- vboxsf 33688 0 - Live 0xe08e2000
- snd_intel8x0 25588 2 - Live 0xe1ac6000
- snd_ac97_codec 100646 1 snd_intel8x0, Live 0xe1a95000
- ac97_bus 1002 1 snd_ac97_codec, Live 0xe1a6a000
- snd_pcm_oss 35308 0 - Live 0xe1a58000
- snd_mixer_oss 13746 1 snd_pcm_oss, Live 0xe098e000
- snd_pcm 70662 3 snd_intel8x0,snd_ac97_codec,snd_pcm_oss, Live 0xe09e8000
- snd_seq_dummy 1338 0 - Live 0xe08fa000
- snd_seq_oss 26726 0 - Live 0xe08b8000
- snd_seq_midi 4557 0 - Live 0xe0880000
- snd_rawmidi 19056 1 snd_seq_midi, Live 0xe1a0f000
- snd_seq_midi_event 6003 2 snd_seq_oss,snd_seq_midi, Live 0xe09fc000
- snd_seq 47263 6 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event, Live 0xe0969000
- snd_timer 19098 2 snd_pcm,snd_seq, Live 0xe0962000
- snd_seq_device 5700 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq, Live 0xe0821000
- ppdev 5259 0 - Live 0xe088e000
- snd 54148 14 snd_intel8x0,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_seq_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_device, Live 0xe0979000
- fbcon 35102 71 - Live 0xe08ef000
- tileblit 2031 1 fbcon, Live 0xe081b000
- font 7557 1 fbcon, Live 0xe08a8000
- bitblit 4707 1 fbcon, Live 0xe0853000
- softcursor 1189 1 bitblit, Live 0xe081e000
- soundcore 6620 1 snd, Live 0xe088a000
- joydev 8708 0 - Live 0xe0812000
- psmouse 63245 0 - Live 0xe09ba000
- serio_raw 3978 0 - Live 0xe085e000
- parport_pc 25962 0 - Live 0xe0841000
- snd_page_alloc 7076 2 snd_intel8x0,snd_pcm, Live 0xe0824000
- i2c_piix4 8335 0 - Live 0xe0816000
- vboxguest 150464 8 vboxsf, Live 0xe0993000
- vga16fb 11385 1 - Live 0xe0859000
- vgastate 8961 1 vga16fb, Live 0xe084a000
- lp 7028 0 - Live 0xe083d000
- parport 32635 3 ppdev,parport_pc,lp, Live 0xe07ff000
- usbhid 36110 0 - Live 0xe08ad000
- ahci 32200 2 - Live 0xe0892000
- e1000 97396 0 - Live 0xe0860000
- hid 67032 1 usbhid, Live 0xe082a000
CentOS:
- [nonus25@localhost ~]$ cat /proc/mo
- modules mounts
- [nonus25@localhost ~]$ cat /proc/modules
- nls_utf8 6209 1 - Live 0xe1db7000
- ipt_MASQUERADE 7617 3 - Live 0xe1d24000
- iptable_nat 10949 1 - Live 0xe1d5b000
- ip_nat 20973 2 ipt_MASQUERADE,iptable_nat, Live 0xe1d9b000
- bridge 68701 0 - Live 0xe1dcd000
- vboxsf 38088 0 - Live 0xe1e36000 (U)
- autofs4 29253 3 - Live 0xe1dae000
- hidp 22977 2 - Live 0xe1d94000
- rfcomm 42457 0 - Live 0xe1da2000
- l2cap 29761 10 hidp,rfcomm, Live 0xe1d40000
- bluetooth 53797 5 hidp,rfcomm,l2cap, Live 0xe1d85000
- lockd 63209 0 - Live 0xe1d4a000
- sunrpc 149373 2 lockd, Live 0xe1d5f000
- ip_conntrack_ftp 11569 0 - Live 0xe1d1a000
- ip_conntrack_netbios_ns 6977 0 - Live 0xe1cf1000
- ipt_REJECT 9537 3 - Live 0xe1d16000
- xt_state 6209 13 - Live 0xe1cfa000
- ip_conntrack 53281 6 ipt_MASQUERADE,iptable_nat,ip_nat,ip_conntrack_ftp,ip_conntrack_netbios_ns,xt_state, Live 0xe1d27000
- nfnetlink 10713 2 ip_nat,ip_conntrack, Live 0xe1d12000
- iptable_filter 7105 1 - Live 0xe1cee000
- ip_tables 17029 2 iptable_nat,iptable_filter, Live 0xe1cf4000
- ip6t_REJECT 9281 1 - Live 0xe1cea000
- xt_tcpudp 7105 34 - Live 0xe1c67000
- ip6table_filter 6849 1 - Live 0xe0ad3000
- ip6_tables 18181 1 ip6table_filter, Live 0xe1c61000
- x_tables 17349 8 ipt_MASQUERADE,iptable_nat,ipt_REJECT,xt_state,ip_tables,ip6t_REJECT,xt_tcpudp,ip6_tables, Live 0xe1c5b000
- be2iscsi 59093 0 - Live 0xe1cfd000
- ib_iser 35609 0 - Live 0xe1ce0000
- rdma_cm 35705 1 ib_iser, Live 0xe1cd6000
- ib_cm 39213 1 rdma_cm, Live 0xe1ccb000
- iw_cm 13125 1 rdma_cm, Live 0xe1c56000
- ib_sa 39093 2 rdma_cm,ib_cm, Live 0xe1cc0000
- ib_mad 37717 2 ib_cm,ib_sa, Live 0xe1c31000
- ib_core 63557 6 ib_iser,rdma_cm,ib_cm,iw_cm,ib_sa,ib_mad, Live 0xe1c6a000
- ib_addr 11717 1 rdma_cm, Live 0xe1c2d000
- iscsi_tcp 20041 0 - Live 0xe0b49000
- bnx2i 43229 0 - Live 0xe1c4a000
- cnic 50261 1 bnx2i, Live 0xe1c3c000
- ipv6 271393 18 ip6t_REJECT,cnic, Live 0xe1c7c000
- xfrm_nalgo 13381 1 ipv6, Live 0xe0b73000
- crypto_api 12609 1 xfrm_nalgo, Live 0xe0b54000
- uio 14793 1 cnic, Live 0xe0b4f000
- cxgb3i 31177 0 - Live 0xe0b6a000
- libcxgbi 54477 1 cxgb3i, Live 0xe0b5b000
- cxgb3 167193 1 cxgb3i, Live 0xe1c03000
- 8021q 25929 1 cxgb3, Live 0xe0af8000
- libiscsi_tcp 22213 3 iscsi_tcp,cxgb3i,libcxgbi, Live 0xe0b00000
- libiscsi2 42693 7 be2iscsi,ib_iser,iscsi_tcp,bnx2i,cxgb3i,libcxgbi,libiscsi_tcp, Live 0xe0ae0000
- scsi_transport_iscsi2 37709 8 be2iscsi,ib_iser,iscsi_tcp,bnx2i,libcxgbi,libiscsi2, Live 0xe0aed000
- scsi_transport_iscsi 6085 1 scsi_transport_iscsi2, Live 0xe0ad6000
- loop 18633 0 - Live 0xe0ada000
- dm_multipath 26957 0 - Live 0xe0abf000
- scsi_dh 12481 1 dm_multipath, Live 0xe0ace000
- video 21193 0 - Live 0xe0ac7000
- backlight 10049 1 video, Live 0xe0a80000
- sbs 18533 0 - Live 0xe0ab3000
- power_meter 16461 0 - Live 0xe0ab9000
- hwmon 7365 1 power_meter, Live 0xe0a73000
- i2c_ec 9025 1 sbs, Live 0xe0aaf000
- dell_wmi 8401 0 - Live 0xe0a84000
- wmi 12137 1 dell_wmi, Live 0xe0aab000
- button 10705 0 - Live 0xe0a3c000
- battery 13637 0 - Live 0xe0aa6000
- asus_acpi 19289 0 - Live 0xe0aa0000
- ac 9157 0 - Live 0xe0a6f000
- lp 15849 0 - Live 0xe0993000
- joydev 13185 0 - Live 0xe0a6a000
- sg 36717 0 - Live 0xe0a76000
- pata_acpi 9665 0 - Live 0xe0a38000
- ata_generic 10565 0 - Live 0xe0a13000
- snd_intel8x0 35421 1 - Live 0xe09fb000
- snd_ac97_codec 93025 1 snd_intel8x0, Live 0xe0a88000
- ac97_bus 6337 1 snd_ac97_codec, Live 0xe09f8000
- snd_seq_dummy 7877 0 - Live 0xe09f5000
- snd_seq_oss 32577 0 - Live 0xe0a61000
- snd_seq_midi_event 11073 1 snd_seq_oss, Live 0xe099f000
- snd_seq 49585 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event, Live 0xe0a05000
- e1000 120285 0 - Live 0xe0a19000
- pcspkr 7105 0 - Live 0xe099c000
- vboxguest 151976 6 vboxsf, Live 0xe09ce000 (U)
- ide_cd 40161 1 - Live 0xe09c3000
- snd_seq_device 11725 3 snd_seq_dummy,snd_seq_oss,snd_seq, Live 0xe0998000
- snd_pcm_oss 42817 0 - Live 0xe094d000
- snd_mixer_oss 19009 1 snd_pcm_oss, Live 0xe098d000
- snd_pcm 72133 3 snd_intel8x0,snd_ac97_codec,snd_pcm_oss, Live 0xe09a3000
- i2c_piix4 13133 0 - Live 0xe0917000
- snd_timer 24517 2 snd_seq,snd_pcm, Live 0xe0975000
- parport_pc 29157 0 - Live 0xe096c000
- snd 55877 11 snd_intel8x0,snd_ac97_codec,snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer, Live 0xe097e000
- i2c_core 24897 2 i2c_ec,i2c_piix4, Live 0xe0964000
- parport 37513 2 lp,parport_pc, Live 0xe0959000
- soundcore 11553 1 snd, Live 0xe0949000
- serio_raw 10693 0 - Live 0xe091c000
- snd_page_alloc 14281 2 snd_intel8x0,snd_pcm, Live 0xe08c3000
- tpm_tis 16713 0 - Live 0xe0943000
- tpm 19041 1 tpm_tis, Live 0xe093d000
- tpm_bios 11073 1 tpm, Live 0xe0913000
- cdrom 36577 1 ide_cd, Live 0xe0933000
- dm_raid45 67273 0 - Live 0xe0921000
- dm_message 6977 1 dm_raid45, Live 0xe08c0000
- dm_region_hash 15681 1 dm_raid45, Live 0xe08cf000
- dm_mem_cache 9537 1 dm_raid45, Live 0xe08a7000
- dm_snapshot 23653 0 - Live 0xe08c8000
- dm_zero 6209 0 - Live 0xe08a4000
- dm_mirror 24393 0 - Live 0xe08b9000
- dm_log 14785 3 dm_raid45,dm_region_hash,dm_mirror, Live 0xe08b4000
- dm_mod 63737 11 dm_multipath,dm_raid45,dm_snapshot,dm_zero,dm_mirror,dm_log, Live 0xe08fc000
- ata_piix 24005 0 - Live 0xe08ad000
- ahci 38477 2 - Live 0xe0843000
- libata 156805 4 pata_acpi,ata_generic,ata_piix,ahci, Live 0xe08d4000
- sd_mod 25281 3 - Live 0xe083b000
- scsi_mod 144021 11 be2iscsi,ib_iser,iscsi_tcp,bnx2i,libcxgbi,libiscsi2,scsi_transport_iscsi2,scsi_dh,sg,libata,sd_mod, Live 0xe085e000
- ext3 125769 2 - Live 0xe0884000
- jbd 57705 1 ext3, Live 0xe084e000
- uhci_hcd 25421 0 - Live 0xe0833000
- ohci_hcd 24937 0 - Live 0xe0816000
- ehci_hcd 34125 0 - Live 0xe081e000
/proc/mounts
Ubuntu:
- nonus25@localhost:~$ cat /proc/mounts
- rootfs / rootfs rw 0 0
- none /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
- none /proc proc rw,nosuid,nodev,noexec,relatime 0 0
- none /dev devtmpfs rw,relatime,size=250416k,nr_inodes=62604,mode=755 0 0
- none /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
- /dev/disk/by-uuid/778034df-2dc9-42b5-8a74-fc50236809e7 / ext4 rw,relatime,errors=remount-ro,barrier=1,data=ordered 0 0
- none /sys/fs/fuse/connections fusectl rw,relatime 0 0
- none /sys/kernel/debug debugfs rw,relatime 0 0
- none /sys/kernel/security securityfs rw,relatime 0 0
- none /dev/shm tmpfs rw,nosuid,nodev,relatime 0 0
- none /var/run tmpfs rw,nosuid,relatime,mode=755 0 0
- none /var/lock tmpfs rw,nosuid,nodev,noexec,relatime 0 0
- none /lib/init/rw tmpfs rw,nosuid,relatime,mode=755 0 0
- binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,nosuid,nodev,noexec,relatime 0 0
- gvfs-fuse-daemon /home/nonus25/.gvfs fuse.gvfs-fuse-daemon rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0
- /dev/sr0 /media/VBOXADDITIONS_3.2.12_68302 iso9660 ro,nosuid,nodev,relatime,uid=1000,gid=1000,iocharset=utf8,mode=0400,dmode=0500 0 0
CentOS:
- [nonus25@localhost ~]$ cat /proc/mounts
- rootfs / rootfs rw 0 0
- /dev/root / ext3 rw,data=ordered 0 0
- /dev /dev tmpfs rw 0 0
- /proc /proc proc rw 0 0
- /sys /sys sysfs rw 0 0
- none /selinux selinuxfs rw 0 0
- /proc/bus/usb /proc/bus/usb usbfs rw 0 0
- devpts /dev/pts devpts rw 0 0
- /dev/sda1 /boot ext3 rw,data=ordered 0 0
- tmpfs /dev/shm tmpfs rw 0 0
- none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
- sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
- /etc/auto.misc /misc autofs rw,fd=7,pgrp=2581,timeout=300,minproto=5,maxproto=5,indirect 0 0
- -hosts /net autofs rw,fd=13,pgrp=2581,timeout=300,minproto=5,maxproto=5,indirect 0 0
- /dev/hdc /media/VBOXADDITIONS_3.2.12_68302 iso9660 ro,nosuid,nodev 0 0
/proc/meminfo
Ubuntu:
- nonus25@localhost:~$ cat /proc/meminfo
- MemTotal: 509276 kB
- MemFree: 11880 kB
- Buffers: 36464 kB
- Cached: 254984 kB
- SwapCached: 2696 kB
- Active: 212760 kB
- Inactive: 243048 kB
- Active(anon): 58592 kB
- Inactive(anon): 115004 kB
- Active(file): 154168 kB
- Inactive(file): 128044 kB
- Unevictable: 16 kB
- Mlocked: 16 kB
- HighTotal: 0 kB
- HighFree: 0 kB
- LowTotal: 509276 kB
- LowFree: 11880 kB
- SwapTotal: 704504 kB
- SwapFree: 686700 kB
- Dirty: 0 kB
- Writeback: 0 kB
- AnonPages: 162364 kB
- Mapped: 37568 kB
- Shmem: 9264 kB
- Slab: 25264 kB
- SReclaimable: 17328 kB
- SUnreclaim: 7936 kB
- KernelStack: 1848 kB
- PageTables: 4568 kB
- NFS_Unstable: 0 kB
- Bounce: 0 kB
- WritebackTmp: 0 kB
- CommitLimit: 959140 kB
- Committed_AS: 573500 kB
- VmallocTotal: 507960 kB
- VmallocUsed: 27088 kB
- VmallocChunk: 469876 kB
- HardwareCorrupted: 0 kB
- HugePages_Total: 0
- HugePages_Free: 0
- HugePages_Rsvd: 0
- HugePages_Surp: 0
- Hugepagesize: 4096 kB
- DirectMap4k: 12224 kB
- DirectMap4M: 512000 kB
CentOS:
- [nonus25@localhost ~]$ cat /proc/meminfo
- MemTotal: 514900 kB
- MemFree: 18484 kB
- Buffers: 29392 kB
- Cached: 314436 kB
- SwapCached: 0 kB
- Active: 195716 kB
- Inactive: 264712 kB
- HighTotal: 0 kB
- HighFree: 0 kB
- LowTotal: 514900 kB
- LowFree: 18484 kB
- SwapTotal: 1048568 kB
- SwapFree: 1048568 kB
- Dirty: 16 kB
- Writeback: 0 kB
- AnonPages: 116600 kB
- Mapped: 43372 kB
- Slab: 24884 kB
- PageTables: 4300 kB
- NFS_Unstable: 0 kB
- Bounce: 0 kB
- CommitLimit: 1306016 kB
- Committed_AS: 573672 kB
- VmallocTotal: 507896 kB
- VmallocUsed: 22264 kB
- VmallocChunk: 485108 kB
- HugePages_Total: 0
- HugePages_Free: 0
- HugePages_Rsvd: 0
- Hugepagesize: 4096 kB
Po wy listowaniu katalogu /proc/
można zauważyć podkatalogi których nazwę tworzą numery, są to nic innego jak procesy naszego systemu, przykład:
Ubuntu:
- nonus25@localhost:~$ ls /proc/
- 1 1088 12846 2 45 833 driver pagetypeinfo
- 10 1094 12847 20 4970 9 execdomains partitions
- 10057 11 1285 21 5 9535 fb sched_debug
- 10059 1123 1293 22 5023 9536 filesystems schedstat
- 10123 1137 1294 23 5025 9537 fs scsi
- 10124 1168 1299 237 519 9538 interrupts self
- 10168 1178 13 24 536 9541 iomem slabinfo
- 1026 1184 1302 2417 542 9542 ioports softirqs
- 1037 1188 1304 2554 547 9543 irq stat
- 1043 12 1305 27 564 956 kallsyms swaps
- 1045 1201 13097 28 568 960 kcore sys
- 1048 1207 1310 29 569 972 key-users sysrq-trigger
- 1049 1210 13110 3 6 981 kmsg sysvipc
- 1052 1219 1314 30 6176 acpi kpagecount timer_list
- 1058 1228 1318 31 6180 asound kpageflags timer_stats
- 1061 1231 14 32 650 buddyinfo latency_stats tty
- 1063 1240 15 36 695 bus loadavg uptime
- 1068 1241 154 37 699 cgroups locks version
- 1073 1242 158 379 7 cmdline mdstat version_signature
- 1075 1243 16 4 706 cpuinfo meminfo vmallocinfo
- 1077 1262 17 40 707 crypto misc vmstat
- 1080 1263 176 41 710 devices modules zoneinfo
- 1081 1275 177 42 716 diskstats mounts
- 1085 1279 18 43 7827 dma mtrr
- 1086 1282 19 44 8 dri net
CentOS:
- [nonus25@localhost ~]$ ls /proc/
- 1 1594 2500 2916 3218 3411 3568 dma mounts
- 10 1684 2510 2917 3223 3413 3599 driver mtrr
- 11 1962 2520 294 3224 3416 3601 execdomains net
- 117 2 2541 2980 3255 3429 3602 fb partitions
- 118 2076 2581 2985 3257 3444 3651 filesystems schedstat
- 119 2078 2665 299 3260 3470 382 fs scsi
- 120 2099 2684 3 3264 3474 4 ide self
- 121 2112 2689 3044 3266 3477 48 interrupts slabinfo
- 1291 2115 270 308 3278 3479 5 iomem stat
- 1292 2200 2706 3120 3308 3480 51 ioports swaps
- 1349 2234 2719 3161 3316 3487 53 irq sys
- 1504 2240 2735 3162 3322 3489 6 kallsyms sysrq-trigger
- 1536 2276 2757 3163 3342 349 7 kcore sysvipc
- 1553 2360 2766 3164 3365 3499 acpi keys tty
- 1559 2376 2780 3165 3366 3501 asound key-users uptime
- 1560 2389 2793 3175 3373 3503 buddyinfo kmsg version
- 1561 2395 2824 319 3376 3526 bus loadavg vmcore
- 1565 2416 2837 3190 3378 3528 cmdline locks vmstat
- 1567 2461 2849 3214 3399 3537 cpuinfo mdstat zoneinfo
- 1569 2475 2878 3215 3403 3539 crypto meminfo
- 1587 2492 290 3216 3405 3541 devices misc
- 1593 2493 291 3217 3409 3566 diskstats modules
Some Hardware Information
Komendy odpowiadające za wy listowanie informacji na temat lokalnego sprzętu
lsusb
podaje podłączone urządzenia usbUbuntu:
- nonus25@localhost:~$ lsusb
- Bus 002 Device 002: ID 80ee:0021
- 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
CentOS:
- [nonus25@localhost ~]$ /sbin/lsusb
- Bus 001 Device 001: ID 0000:0000
- Bus 002 Device 001: ID 0000:0000
- Bus 002 Device 002: ID 80ee:0021 VirtualBox USB Tablet
lspci
podaje wewnętrzne urządzeniaUbuntu:
- nonus25@localhost:~$ lspci
- 00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
- 00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
- 00:01.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
- 00:02.0 VGA compatible controller: InnoTek Systemberatung GmbH VirtualBox Graphics Adapter
- 00:03.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 02)
- 00:04.0 System peripheral: InnoTek Systemberatung GmbH VirtualBox Guest Service
- 00:05.0 Multimedia audio controller: Intel Corporation 82801AA AC'97 Audio Controller (rev 01)
- 00:06.0 USB Controller: Apple Computer Inc. KeyLargo/Intrepid USB
- 00:07.0 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 08)
- 00:0b.0 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB2 EHCI Controller
- 00:0d.0 SATA controller: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) SATA AHCI Controller (rev 02)
CentOS:
- [nonus25@localhost ~]$ /sbin/lspci
- 00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
- 00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
- 00:01.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
- 00:02.0 VGA compatible controller: InnoTek Systemberatung GmbH VirtualBox Graphics Adapter
- 00:03.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 02)
- 00:04.0 System peripheral: InnoTek Systemberatung GmbH VirtualBox Guest Service
- 00:05.0 Multimedia audio controller: Intel Corporation 82801AA AC'97 Audio Controller (rev 01)
- 00:06.0 USB Controller: Apple Computer Inc. KeyLargo/Intrepid USB
- 00:07.0 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 08)
- 00:0b.0 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB2 EHCI Controller
- 00:0d.0 SATA controller: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) SATA AHCI Controller (rev 02)
lsmod
daje listę załadowanych sterownikówUbuntu:
- nonus25@localhost:~$ lsmod
- Module Size Used by
- btrfs 459002 0
- zlib_deflate 19568 1 btrfs
- crc32c 2519 1
- libcrc32c 875 1 btrfs
- ufs 72774 0
- qnx4 6484 0
- hfsplus 70800 0
- hfs 40754 0
- minix 25197 0
- ntfs 94791 0
- vfat 8933 0
- msdos 6392 0
- fat 47767 2 vfat,msdos
- jfs 172682 0
- xfs 515548 0
- exportfs 3437 1 xfs
- reiserfs 225539 0
- nls_utf8 1069 1
- isofs 29250 1
- vboxvideo 1228 2
- drm 162377 3 vboxvideo
- agpgart 31724 1 drm
- binfmt_misc 6587 1
- vboxsf 33688 0
- snd_intel8x0 25588 2
- snd_ac97_codec 100646 1 snd_intel8x0
- ac97_bus 1002 1 snd_ac97_codec
- snd_pcm_oss 35308 0
- snd_mixer_oss 13746 1 snd_pcm_oss
- snd_pcm 70662 3 snd_intel8x0,snd_ac97_codec,snd_pcm_oss
- snd_seq_dummy 1338 0
- snd_seq_oss 26726 0
- snd_seq_midi 4557 0
- snd_rawmidi 19056 1 snd_seq_midi
- snd_seq_midi_event 6003 2 snd_seq_oss,snd_seq_midi
- snd_seq 47263 6 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event
- snd_timer 19098 2 snd_pcm,snd_seq
- snd_seq_device 5700 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq
- ppdev 5259 0
- snd 54148 14 snd_intel8x0,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_seq_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
- fbcon 35102 71
- tileblit 2031 1 fbcon
- font 7557 1 fbcon
- bitblit 4707 1 fbcon
- softcursor 1189 1 bitblit
- soundcore 6620 1 snd
- joydev 8708 0
- psmouse 63245 0
- serio_raw 3978 0
- parport_pc 25962 0
- snd_page_alloc 7076 2 snd_intel8x0,snd_pcm
- i2c_piix4 8335 0
- vboxguest 150464 8 vboxsf
- vga16fb 11385 1
- vgastate 8961 1 vga16fb
- lp 7028 0
- parport 32635 3 ppdev,parport_pc,lp
- usbhid 36110 0
- ahci 32200 2
- e1000 97396 0
- hid 67032 1 usbhid
CentOS:
- [nonus25@localhost ~]$ /sbin/lsmod
- Module Size Used by
- nls_utf8 6209 1
- ipt_MASQUERADE 7617 3
- iptable_nat 10949 1
- ip_nat 20973 2 ipt_MASQUERADE,iptable_nat
- bridge 68701 0
- vboxsf 38088 0
- autofs4 29253 3
- hidp 22977 2
- rfcomm 42457 0
- l2cap 29761 10 hidp,rfcomm
- bluetooth 53797 5 hidp,rfcomm,l2cap
- lockd 63209 0
- sunrpc 149373 2 lockd
- ip_conntrack_ftp 11569 0
- ip_conntrack_netbios_ns 6977 0
- ipt_REJECT 9537 3
- xt_state 6209 13
- ip_conntrack 53281 6 ipt_MASQUERADE,iptable_nat,ip_nat,ip_conntrack_ftp,ip_conntrack_netbios_ns,xt_state
- nfnetlink 10713 2 ip_nat,ip_conntrack
- iptable_filter 7105 1
- ip_tables 17029 2 iptable_nat,iptable_filter
- ip6t_REJECT 9281 1
- xt_tcpudp 7105 34
- ip6table_filter 6849 1
- ip6_tables 18181 1 ip6table_filter
- x_tables 17349 8 ipt_MASQUERADE,iptable_nat,ipt_REJECT,xt_state,ip_tables,ip6t_REJECT,xt_tcpudp,ip6_tables
- be2iscsi 59093 0
- ib_iser 35609 0
- rdma_cm 35705 1 ib_iser
- ib_cm 39213 1 rdma_cm
- iw_cm 13125 1 rdma_cm
- ib_sa 39093 2 rdma_cm,ib_cm
- ib_mad 37717 2 ib_cm,ib_sa
- ib_core 63557 6 ib_iser,rdma_cm,ib_cm,iw_cm,ib_sa,ib_mad
- ib_addr 11717 1 rdma_cm
- iscsi_tcp 20041 0
- bnx2i 43229 0
- cnic 50261 1 bnx2i
- ipv6 271393 18 ip6t_REJECT,cnic
- xfrm_nalgo 13381 1 ipv6
- crypto_api 12609 1 xfrm_nalgo
- uio 14793 1 cnic
- cxgb3i 31177 0
- libcxgbi 54477 1 cxgb3i
- cxgb3 167193 1 cxgb3i
- 8021q 25929 1 cxgb3
- libiscsi_tcp 22213 3 iscsi_tcp,cxgb3i,libcxgbi
- libiscsi2 42693 7 be2iscsi,ib_iser,iscsi_tcp,bnx2i,cxgb3i,libcxgbi,libiscsi_tcp
- scsi_transport_iscsi2 37709 8 be2iscsi,ib_iser,iscsi_tcp,bnx2i,libcxgbi,libiscsi2
- scsi_transport_iscsi 6085 1 scsi_transport_iscsi2
- loop 18633 0
- dm_multipath 26957 0
- scsi_dh 12481 1 dm_multipath
- video 21193 0
- backlight 10049 1 video
- sbs 18533 0
- power_meter 16461 0
- hwmon 7365 1 power_meter
- i2c_ec 9025 1 sbs
- dell_wmi 8401 0
- wmi 12137 1 dell_wmi
- button 10705 0
- battery 13637 0
- asus_acpi 19289 0
- ac 9157 0
- lp 15849 0
- joydev 13185 0
- sg 36717 0
- pata_acpi 9665 0
- ata_generic 10565 0
- snd_intel8x0 35421 1
- snd_ac97_codec 93025 1 snd_intel8x0
- ac97_bus 6337 1 snd_ac97_codec
- snd_seq_dummy 7877 0
- snd_seq_oss 32577 0
- snd_seq_midi_event 11073 1 snd_seq_oss
- snd_seq 49585 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
- e1000 120285 0
- pcspkr 7105 0
- vboxguest 151976 6 vboxsf
- ide_cd 40161 1
- snd_seq_device 11725 3 snd_seq_dummy,snd_seq_oss,snd_seq
- snd_pcm_oss 42817 0
- snd_mixer_oss 19009 1 snd_pcm_oss
- snd_pcm 72133 3 snd_intel8x0,snd_ac97_codec,snd_pcm_oss
- i2c_piix4 13133 0
- snd_timer 24517 2 snd_seq,snd_pcm
- parport_pc 29157 0
- snd 55877 11 snd_intel8x0,snd_ac97_codec,snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer
- i2c_core 24897 2 i2c_ec,i2c_piix4
- parport 37513 2 lp,parport_pc
- soundcore 11553 1 snd
- serio_raw 10693 0
- snd_page_alloc 14281 2 snd_intel8x0,snd_pcm
- tpm_tis 16713 0
- tpm 19041 1 tpm_tis
- tpm_bios 11073 1 tpm
- cdrom 36577 1 ide_cd
- dm_raid45 67273 0
- dm_message 6977 1 dm_raid45
- dm_region_hash 15681 1 dm_raid45
- dm_mem_cache 9537 1 dm_raid45
- dm_snapshot 23653 0
- dm_zero 6209 0
- dm_mirror 24393 0
- dm_log 14785 3 dm_raid45,dm_region_hash,dm_mirror
- dm_mod 63737 11 dm_multipath,dm_raid45,dm_snapshot,dm_zero,dm_mirror,dm_log
- ata_piix 24005 0
- ahci 38477 2
- libata 156805 4 pata_acpi,ata_generic,ata_piix,ahci
- sd_mod 25281 3
- scsi_mod 144021 11 be2iscsi,ib_iser,iscsi_tcp,bnx2i,libcxgbi,libiscsi2,scsi_transport_iscsi2,scsi_dh,sg,libata,sd_mod
- ext3 125769 2
- jbd 57705 1 ext3
- uhci_hcd 25421 0
- ohci_hcd 24937 0
- ehci_hcd 34125 0
Aby zainstalować nowy moduł należy użyć polecenia insmod
, czasami próba załadowania w ten sposób nowego modułu może się nie powieść ze względu na to że moduł ten może mieć jakieś inne zależności w tym celu lepiej skorzystać z innej komendy która również dodaje zależności ładując dany moduł modprobe
Czas powiedzieć coś o oznaczeniach urządzeń przechowujących nasze dane.
- PATA - Parallel Advanced Technology Attachment
- IDE/ATA - sterowniki
- /dev/hda : główny, master
- /dev/hdb : główny, slave
- /dev/hdc : podrzędny, master
- /dev/hdd : podrzędny, slave
- numery przy któryś z tych oznaczeń oznaczają partycje np.
/dev/hda1
- IDE/ATA - sterowniki
- SATA lub SCSI - Serial Advanced Technology Attachment lub Small Computer System Interface
- /dev/sda : główny, master
- /dev/sdb : główny, slave
- /dev/sdc : podrzędny, master
- /dev/sdd : podrzędny, slave
- numery przy któryś z tych oznaczeń oznaczają partycje np.
/dev/sda1
Runlevels
W Linux'ie standardowe poziomy działania są numerowane 0, 1, 2, 3, 4, 5, 6. Każdy z tych stanów jest następną wariacją stanu 1. Dokumentacje tych stanów można znaleźć tu: /etc/inittab
Ubuntu nie posiada tego pliku, default'owy poziom można zmienić /etc/init/rc-sysinit.conf
CentOS:
- [nonus25@localhost ~]$ cat /etc/inittab
- #
- # inittab This file describes how the INIT process should set up
- # the system in a certain run-level.
- #
- # Author: Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
- # Modified for RHS Linux by Marc Ewing and Donnie Barnes
- #
- # Default runlevel. The runlevels used by RHS are:
- # 0 - halt (Do NOT set initdefault to this)
- # 1 - Single user mode
- # 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
- # 3 - Full multiuser mode
- # 4 - unused
- # 5 - X11
- # 6 - reboot (Do NOT set initdefault to this)
- #
- id:5:initdefault:
- # System initialization.
- si::sysinit:/etc/rc.d/rc.sysinit
- l0:0:wait:/etc/rc.d/rc 0
- l1:1:wait:/etc/rc.d/rc 1
- l2:2:wait:/etc/rc.d/rc 2
- l3:3:wait:/etc/rc.d/rc 3
- l4:4:wait:/etc/rc.d/rc 4
- l5:5:wait:/etc/rc.d/rc 5
- l6:6:wait:/etc/rc.d/rc 6
- # Trap CTRL-ALT-DELETE
- ca::ctrlaltdel:/sbin/shutdown -t3 -r now
- # When our UPS tells us power has failed, assume we have a few minutes
- # of power left. Schedule a shutdown for 2 minutes from now.
- # This does, of course, assume you have powerd installed and your
- # UPS connected and working correctly.
- pf::powerfail:/sbin/shutdown -f -h +2 "Power Failure; System Shutting Down"
- # If power was restored before the shutdown kicked in, cancel it.
- pr:12345:powerokwait:/sbin/shutdown -c "Power Restored; Shutdown Cancelled"
- # Run gettys in standard runlevels
- 1:2345:respawn:/sbin/mingetty tty1
- 2:2345:respawn:/sbin/mingetty tty2
- 3:2345:respawn:/sbin/mingetty tty3
- 4:2345:respawn:/sbin/mingetty tty4
- 5:2345:respawn:/sbin/mingetty tty5
- 6:2345:respawn:/sbin/mingetty tty6
- # Run xdm in runlevel 5
- x:5:respawn:/etc/X11/prefdm -nodaemon
- </miquels@drinkel.nl.mugnet.org>
Aby sprawdzić jaki runlevel aktualnie posiadamy podajemy komendę runlevel
Ubuntu:
- nonus25@localhost:~$ runlevel
- N 2
CentOS:
- [nonus25@localhost ~]$ /sbin/runlevel
- N 5
Do zmiany runlevel używamy polecenia init 0
- (halt system) lub telinit 6
(reboots system). Jeżeli wywołujemy skrypt init 0
, to skrypt ten wykonuje wszystkie usługi znajdujące się w /etc/rc0.d/
, zobaczmy co znajduje się w tych katalogach:
Ubuntu:
- nonus25@localhost:~$ ls -lo /etc/rc0.d/
- total 4
- lrwxrwxrwx 1 root 25 2012-01-31 20:18 K65vboxadd-service -> ../init.d/vboxadd-service
- lrwxrwxrwx 1 root 17 2012-01-31 20:16 K70vboxadd -> ../init.d/vboxadd
- lrwxrwxrwx 1 root 21 2012-01-31 20:18 K70vboxadd-x11 -> ../init.d/vboxadd-x11
- lrwxrwxrwx 1 root 19 2012-01-31 19:30 K74bluetooth -> ../init.d/bluetooth
- -rw-r--r-- 1 root 353 2012-01-20 09:09 README
- lrwxrwxrwx 1 root 29 2012-01-31 19:30 S10unattended-upgrades -> ../init.d/unattended-upgrades
- lrwxrwxrwx 1 root 22 2012-01-31 19:30 S15wpa-ifupdown -> ../init.d/wpa-ifupdown
- lrwxrwxrwx 1 root 18 2012-01-31 19:30 S20sendsigs -> ../init.d/sendsigs
- lrwxrwxrwx 1 root 17 2012-01-31 19:30 S30urandom -> ../init.d/urandom
- lrwxrwxrwx 1 root 22 2012-01-31 19:30 S31umountnfs.sh -> ../init.d/umountnfs.sh
- lrwxrwxrwx 1 root 20 2012-01-31 19:30 S35networking -> ../init.d/networking
- lrwxrwxrwx 1 root 18 2012-01-31 19:30 S40umountfs -> ../init.d/umountfs
- lrwxrwxrwx 1 root 20 2012-01-31 19:30 S60umountroot -> ../init.d/umountroot
- lrwxrwxrwx 1 root 14 2012-01-31 19:30 S90halt -> ../init.d/halt
CentOS:
- [nonus25@localhost ~]$ ls -lo /etc/rc0.d/
- total 460
- lrwxrwxrwx 1 root 20 Jan 25 20:14 K00xendomains -> ../init.d/xendomains
- lrwxrwxrwx 1 root 17 Jan 25 19:32 K01dnsmasq -> ../init.d/dnsmasq
- lrwxrwxrwx 1 root 24 Jan 25 19:38 K01libvirt-guests -> ../init.d/libvirt-guests
- lrwxrwxrwx 1 root 14 Jan 25 19:35 K01luci -> ../init.d/luci
- lrwxrwxrwx 1 root 21 Jan 25 19:38 K01modclusterd -> ../init.d/modclusterd
- lrwxrwxrwx 1 root 19 Jan 25 19:38 K01rgmanager -> ../init.d/rgmanager
- lrwxrwxrwx 1 root 15 Jan 25 19:38 K01ricci -> ../init.d/ricci
- lrwxrwxrwx 1 root 24 Jan 25 19:36 K01setroubleshoot -> ../init.d/setroubleshoot
- lrwxrwxrwx 1 root 16 Jan 25 19:33 K01smartd -> ../init.d/smartd
- lrwxrwxrwx 1 root 21 Jan 25 19:33 K01tog-pegasus -> ../init.d/tog-pegasus
- lrwxrwxrwx 1 root 14 Jan 25 19:38 K01xend -> ../init.d/xend
- lrwxrwxrwx 1 root 22 Jan 25 19:32 K02avahi-daemon -> ../init.d/avahi-daemon
- lrwxrwxrwx 1 root 24 Jan 25 19:32 K02avahi-dnsconfd -> ../init.d/avahi-dnsconfd
- lrwxrwxrwx 1 root 24 Jan 25 19:38 K02NetworkManager -> ../init.d/NetworkManager
- lrwxrwxrwx 1 root 17 Jan 25 19:32 K02oddjobd -> ../init.d/oddjobd
- lrwxrwxrwx 1 root 18 Jan 25 19:38 K03libvirtd -> ../init.d/libvirtd
- lrwxrwxrwx 1 root 22 Jan 25 19:37 K03yum-updatesd -> ../init.d/yum-updatesd
- lrwxrwxrwx 1 root 17 Jan 25 19:30 K05anacron -> ../init.d/anacron
- lrwxrwxrwx 1 root 13 Jan 25 19:33 K05atd -> ../init.d/atd
- lrwxrwxrwx 1 root 16 Jan 25 19:30 K05conman -> ../init.d/conman
- lrwxrwxrwx 1 root 14 Jan 25 19:34 K05innd -> ../init.d/innd
- lrwxrwxrwx 1 root 19 Jan 25 19:32 K05saslauthd -> ../init.d/saslauthd
- lrwxrwxrwx 1 root 17 Jan 25 19:33 K05wdaemon -> ../init.d/wdaemon
- lrwxrwxrwx 1 root 14 Jan 25 19:32 K10cups -> ../init.d/cups
- lrwxrwxrwx 1 root 19 Jan 25 19:30 K10dc_server -> ../init.d/dc_server
- lrwxrwxrwx 1 root 15 Jan 25 19:36 K10hplip -> ../init.d/hplip
- lrwxrwxrwx 1 root 21 Jan 25 19:33 K10piranha-gui -> ../init.d/piranha-gui
- lrwxrwxrwx 1 root 16 Jan 25 19:30 K10psacct -> ../init.d/psacct
- lrwxrwxrwx 1 root 15 Jan 25 19:33 K10pulse -> ../init.d/pulse
- lrwxrwxrwx 1 root 14 Jan 25 19:31 K10tcsd -> ../init.d/tcsd
- lrwxrwxrwx 1 root 13 Jan 25 19:36 K10xfs -> ../init.d/xfs
- lrwxrwxrwx 1 root 19 Jan 25 19:30 K12dc_client -> ../init.d/dc_client
- lrwxrwxrwx 1 root 13 Jan 25 19:29 K15gpm -> ../init.d/gpm
- lrwxrwxrwx 1 root 15 Jan 25 19:32 K15httpd -> ../init.d/httpd
- lrwxrwxrwx 1 root 18 Jan 30 01:56 K15svnserve -> ../init.d/svnserve
- lrwxrwxrwx 1 root 13 Jan 25 19:36 K20nfs -> ../init.d/nfs
- lrwxrwxrwx 1 root 17 Jan 25 19:30 K20openais -> ../init.d/openais
- lrwxrwxrwx 1 root 15 Jan 25 19:29 K20rwhod -> ../init.d/rwhod
- lrwxrwxrwx 1 root 14 Jan 25 19:38 K24irda -> ../init.d/irda
- lrwxrwxrwx 1 root 15 Jan 25 19:34 K25squid -> ../init.d/squid
- lrwxrwxrwx 1 root 14 Jan 25 19:33 K25sshd -> ../init.d/sshd
- lrwxrwxrwx 1 root 18 Jan 25 19:32 K30sendmail -> ../init.d/sendmail
- lrwxrwxrwx 1 root 22 Jan 25 19:33 K30spamassassin -> ../init.d/spamassassin
- lrwxrwxrwx 1 root 17 Jan 25 20:10 K35dovecot -> ../init.d/dovecot
- lrwxrwxrwx 1 root 13 Jan 25 19:32 K35smb -> ../init.d/smb
- lrwxrwxrwx 1 root 19 Jan 25 19:38 K35vncserver -> ../init.d/vncserver
- lrwxrwxrwx 1 root 17 Jan 25 19:32 K35winbind -> ../init.d/winbind
- lrwxrwxrwx 1 root 20 Jan 25 19:32 K44rawdevices -> ../init.d/rawdevices
- lrwxrwxrwx 1 root 16 Jan 25 19:29 K50ibmasm -> ../init.d/ibmasm
- lrwxrwxrwx 1 root 20 Jan 25 19:32 K50netconsole -> ../init.d/netconsole
- lrwxrwxrwx 1 root 15 Jan 25 19:32 K50snmpd -> ../init.d/snmpd
- lrwxrwxrwx 1 root 19 Jan 25 19:32 K50snmptrapd -> ../init.d/snmptrapd
- lrwxrwxrwx 1 root 13 Jan 25 19:30 K50tux -> ../init.d/tux
- lrwxrwxrwx 1 root 16 Jan 25 19:33 K50vsftpd -> ../init.d/vsftpd
- lrwxrwxrwx 1 root 16 Jan 25 19:35 K50xinetd -> ../init.d/xinetd
- lrwxrwxrwx 1 root 15 Jan 25 19:32 K60crond -> ../init.d/crond
- lrwxrwxrwx 1 root 25 Jan 30 00:23 K65vboxadd-service -> ../init.d/vboxadd-service
- lrwxrwxrwx 1 root 20 Jan 25 19:36 K69rpcsvcgssd -> ../init.d/rpcsvcgssd
- lrwxrwxrwx 1 root 17 Jan 30 00:22 K70vboxadd -> ../init.d/vboxadd
- lrwxrwxrwx 1 root 21 Jan 30 00:23 K70vboxadd-x11 -> ../init.d/vboxadd-x11
- lrwxrwxrwx 1 root 16 Jan 25 19:30 K72autofs -> ../init.d/autofs
- lrwxrwxrwx 1 root 16 Jan 25 19:32 K73ypbind -> ../init.d/ypbind
- lrwxrwxrwx 1 root 15 Jan 25 19:33 K74acpid -> ../init.d/acpid
- lrwxrwxrwx 1 root 14 Jan 25 19:38 K74apmd -> ../init.d/apmd
- lrwxrwxrwx 1 root 13 Jan 25 19:29 K74gfs -> ../init.d/gfs
- lrwxrwxrwx 1 root 14 Jan 25 19:29 K74gfs2 -> ../init.d/gfs2
- lrwxrwxrwx 1 root 19 Jan 25 19:38 K74haldaemon -> ../init.d/haldaemon
- lrwxrwxrwx 1 root 20 Jan 25 19:29 K74lm_sensors -> ../init.d/lm_sensors
- lrwxrwxrwx 1 root 22 Jan 30 01:56 K74lvm2-monitor -> ../init.d/lvm2-monitor
- lrwxrwxrwx 1 root 14 Jan 25 20:10 K74nscd -> ../init.d/nscd
- lrwxrwxrwx 1 root 14 Jan 25 19:30 K74ntpd -> ../init.d/ntpd
- lrwxrwxrwx 1 root 15 Jan 25 19:32 K75netfs -> ../init.d/netfs
- lrwxrwxrwx 1 root 22 Jan 25 19:36 K75scsi_reserve -> ../init.d/scsi_reserve
- lrwxrwxrwx 1 root 15 Jan 25 19:38 K76clvmd -> ../init.d/clvmd
- lrwxrwxrwx 1 root 16 Jan 25 20:12 K78qdiskd -> ../init.d/qdiskd
- lrwxrwxrwx 1 root 14 Jan 25 20:12 K79cman -> ../init.d/cman
- lrwxrwxrwx 1 root 15 Jan 25 19:30 K80kdump -> ../init.d/kdump
- lrwxrwxrwx 1 root 19 Jan 25 19:33 K85mdmonitor -> ../init.d/mdmonitor
- lrwxrwxrwx 1 root 15 Jan 25 19:33 K85mdmpd -> ../init.d/mdmpd
- lrwxrwxrwx 1 root 20 Jan 25 19:32 K85messagebus -> ../init.d/messagebus
- lrwxrwxrwx 1 root 17 Jan 25 19:36 K85rpcgssd -> ../init.d/rpcgssd
- lrwxrwxrwx 1 root 19 Jan 25 19:36 K85rpcidmapd -> ../init.d/rpcidmapd
- lrwxrwxrwx 1 root 17 Jan 25 19:36 K86nfslock -> ../init.d/nfslock
- lrwxrwxrwx 1 root 20 Jan 25 19:33 K87irqbalance -> ../init.d/irqbalance
- lrwxrwxrwx 1 root 18 Jan 25 19:32 K87mcstrans -> ../init.d/mcstrans
- lrwxrwxrwx 1 root 20 Jan 25 19:30 K87multipathd -> ../init.d/multipathd
- lrwxrwxrwx 1 root 15 Jan 25 19:32 K87named -> ../init.d/named
- lrwxrwxrwx 1 root 17 Jan 25 19:32 K87portmap -> ../init.d/portmap
- lrwxrwxrwx 1 root 21 Jan 25 19:32 K87restorecond -> ../init.d/restorecond
- lrwxrwxrwx 1 root 16 Jan 25 19:30 K88auditd -> ../init.d/auditd
- lrwxrwxrwx 1 root 15 Jan 25 19:32 K88pcscd -> ../init.d/pcscd
- lrwxrwxrwx 1 root 16 Jan 25 19:32 K88syslog -> ../init.d/syslog
- lrwxrwxrwx 1 root 24 Jan 25 19:32 K88wpa_supplicant -> ../init.d/wpa_supplicant
- lrwxrwxrwx 1 root 14 Jan 25 19:33 K89dund -> ../init.d/dund
- lrwxrwxrwx 1 root 14 Jan 25 19:33 K89hidd -> ../init.d/hidd
- lrwxrwxrwx 1 root 17 Jan 25 19:29 K89ipvsadm -> ../init.d/ipvsadm
- lrwxrwxrwx 1 root 15 Jan 25 19:32 K89iscsi -> ../init.d/iscsi
- lrwxrwxrwx 1 root 16 Jan 25 19:32 K89iscsid -> ../init.d/iscsid
- lrwxrwxrwx 1 root 18 Jan 25 19:30 K89netplugd -> ../init.d/netplugd
- lrwxrwxrwx 1 root 14 Jan 25 19:33 K89pand -> ../init.d/pand
- lrwxrwxrwx 1 root 15 Jan 25 19:29 K89rdisc -> ../init.d/rdisc
- lrwxrwxrwx 1 root 19 Jan 25 19:33 K90bluetooth -> ../init.d/bluetooth
- lrwxrwxrwx 1 root 17 Jan 25 19:32 K90network -> ../init.d/network
- lrwxrwxrwx 1 root 14 Jan 25 19:38 K91capi -> ../init.d/capi
- lrwxrwxrwx 1 root 14 Jan 25 19:38 K91isdn -> ../init.d/isdn
- lrwxrwxrwx 1 root 19 Jan 25 19:29 K92ip6tables -> ../init.d/ip6tables
- lrwxrwxrwx 1 root 18 Jan 25 19:29 K92iptables -> ../init.d/iptables
- lrwxrwxrwx 1 root 19 Jan 25 19:38 K95firstboot -> ../init.d/firstboot
- lrwxrwxrwx 1 root 15 Jan 25 19:38 K95kudzu -> ../init.d/kudzu
- lrwxrwxrwx 1 root 18 Jan 25 19:29 K99cpuspeed -> ../init.d/cpuspeed
- lrwxrwxrwx 1 root 23 Jan 25 19:33 K99microcode_ctl -> ../init.d/microcode_ctl
- lrwxrwxrwx 1 root 25 Jan 25 19:34 K99readahead_early -> ../init.d/readahead_early
- lrwxrwxrwx 1 root 25 Jan 25 19:34 K99readahead_later -> ../init.d/readahead_later
- lrwxrwxrwx 1 root 17 Jan 25 19:32 S00killall -> ../init.d/killall
- lrwxrwxrwx 1 root 14 Jan 25 19:32 S01halt -> ../init.d/halt
Skrypty oznaczone literą K oznacza usługi które będą zabite kill
, a skrypty oznaczone literą S odzwierciedlają dany stan, tak jak widzimy powyżej mamy dwa skrypty oznaczone literą S killall i halt. Tak więc widzimy że w tym stanie wszystkie procesy zostaną zabite i system zostanie zatrzymany. Runlevel 1 oznacza single user mode, powoduje również automatyczne zalogowanie do systemu jako root bez pytania o hasło. I oczywiscie uruchamia skrypt znajdujący się /etc/rc1.d/
. Poziom 2 oznacza multiuser bez network'u, w Debain'ach jest używany jako domyślny zaś w RedHat'cie lub CentOS domyślnym poziomem jest poziom 5. Poziom 3, 4, 5 jest zazwyczaj nie używany w Debain'ach. Runlevel 3 w RedHat/CentOS daje nam stan multiuser z network'iem bez GUI. Poziom 4 również nie jest zasadniczo używany w RedHat'cie/CentOS'ie. Poziom 5 dla RedHat'a/CentOS'a jest poziomem domyślnym startuje jako multiuser z network'iem i z GUI. Poziom 6 jest trybem restartu. Równoważną komendą dla init 6
jest komenda shutdown -r now
lub reboot
, a dla komendy init 0
komenda shutdown -h now
lub halt
Brak komentarzy:
Prześlij komentarz