.


:




:

































 

 

 

 





, (threads) (LWP, Light Weight Process). L, ps fLC swriter.bin writer Open Office. , audacity soffice.bin, ( Windows). , l .

 

lsof (List open files) . - .

, ,

lsof -u _

 

lsof c . lsof /bin/bash

 

free

. m.

 

df ( ). h .

du , .

1.2 /proc

Linux /proc. /proc , ( /proc). , ( ) . /proc , .

/proc . - , , , , . "ls -l" , , , . ? - /proc VFS (Virtual File System layer). /, /proc / , .

/, , . , (top, ps . .), / - , , , , /.

/proc/sys. .

 

, :

1. cmdline: (-) , . : , . , : perl -ple 's,\00,,g' cmdline.

2. cwd: ( ).

3. environ: , , =. cmdline : , . : perl -pl -e 's,\00,\n,g' environ.

4. exe: , .

5. fd: , .

6. maps: ( cat, ), , . ( ): , ; , ; , ; ( ) , ; inode ; , , .

7. root: , . /.

8. status: : , , PID PPID, UID GID, .

fd 127, :

ls -l fd total 0 lrwx------ 1 root root 64 Dec 16 22:04 0 -> /dev/console l-wx------ 1 root root 64 Dec 16 22:04 1 -> pipe:[128] l-wx------ 1 root root 64 Dec 16 22:04 2 -> pipe:[129] l-wx------ 1 root root 64 Dec 16 22:04 21 -> pipe:[130] lrwx------ 1 root root 64 Dec 16 22:04 3 -> /dev/apm_bios lr-x------ 1 root root 64 Dec 16 22:04 7 -> pipe:[130] lrwx------ 1 root root 64 Dec 16 22:04 9 -> /dev/console  

, . , - , , .

6.2.

, , / .

/r, ls -d [a-z]* :

 

acpi

asound

buddyinfo

bus

cmdline

cpuinfo

crypto

devices

diskstats

dma

driver

execdomains

fb

filesystems

fs

 

 

ide

interrupts

iomem

ioports

irq

kallsyms

kcore

keys

key-users

kmsg

loadavg

locks

mdstat

meminfo

misc

modules

 

mounts

net

partitions

schedstat

self

slabinfo

stat

swaps

sys

sysrq-trigger

sysvipc

tty

uptime

version

vmstat

zoneinfo


 

, //interrupts , , , .

/proc:

cpuinfo: , , . :

cat /proc/cpuinfo

 

processor: 0

vendor_id: GenuineIntel

cpu family: 6

model: 8

model name: Pentium III (Coppermine)

stepping: 6

cpu MHz: 1000.119

cache size: 256 KB

fdiv_bug: no

hlt_bug: no

sep_bug: no

f00f_bug: no

coma_bug: no

fpu: yes

fpu_exception: yes

cpuid level: 2

wp: yes

flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca

cmov pat pse36 mmx fxsr xmm

bogomips: 1998.85

processor: 3

vendor_id: GenuineIntel

cpu family: 6

model: 8

model name: Pentium III (Coppermine)

stepping: 6

cpu MHz: 1000.119

cache size: 256 KB

fdiv_bug: no

hlt_bug: no

sep_bug: no

f00f_bug: no

coma_bug: no

fpu: yes

fpu_exception: yes

cpuid level: 2

wp: yes

flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca

cmov pat pse36 mmx fxsr xmm

bogomips: 1992.29

 

modules: , , . lsmod, ,

meminf: . free , .

bus: , . , .

acpi: , , , .

 

6.3.

/proc/sys - , , /, , root'a.

C , .


 

2.

 

1. .

2. .

3. top 5 , .

4. 2 , . l.

5. top, 2 .

6. aa

7.

8. .

9. - , /proc

10. , /proc

11. , .

 

3.

 

. :

1. 1- 11 ( ) Linux.

 

4.

 

  1. .
  2. .
  3. Linux.
  4. .
  5. .
  6. .
  7. : , ?
  8. top.
  9. , /proc?
  10. .
  11. .
  12. /proc

 





:


: 2017-02-11; !; : 710 |


:

:

, ,
==> ...

1525 - | 1511 -


© 2015-2024 lektsii.org - -

: 0.035 .