.


:




:

































 

 

 

 


SNMP.




SNMP . , , , , LAN Manager , Windows NT .. , .

. "-", , , . , - , . : .

SNMP - SMI (Structure of Management Information), () () . , ( SNMP), ( SNMP).

SMI . . (). - ( ) , . . . , . OID (Object IDentifier) , .

MIB (Management Information Base).

snmpd /etc/snmpd.conf. snmptrapd, ( ).

SNMP-, UCD (University of California at Davis):

snmpget SNMP-.

snmpgetnext .

snmpwalk - MIB, OID.

snmpset SNMP-.

snmptrap .

snmptable SNMP-.

snmptranslate OID MIB.


11) X Window.

Linux X Window System (X). , XFree86 X.Org (http://www.x.org/wiki/). Linux 2.2 :

- (X server). Linux. - , . , X- , .

(display manager). -. Linux GNOME Desktop Manager (gdm).

(window manager). , , .

(desktop environment). . , . Linux : GNOME KDE, Linux.

- (X-client). - , - , .

, -. X Window -. , , ; -, . - - SSH.

X Window.


12) UNIX.

( ) ( ). 86 .

:

UNIX . , , , . UNIX . -, , ( ), , . -, , , - . -, - i-. i- . , i- , , - , , , , .

login , , shell. login , , /etc/passwd /etc/group. ( ) , . , . setuid setgid, .

: , (uid=0 gid=0). , /etc/passwd uid gid. - , . . ( suid, sudo), .


13) , GNU/Linux.

, :

1 make config

2 make menuconfig

3 make xconfig

 

make config - .

make menuconfig - ( ncurses).

make xconfig - .

3 : y,m,n.

y(yes) - . m(module) - ( reboot'a). . n(no) - .

.

:

1)

 

-> make dep

-> make clean

 

2)

 

-> make bzImage|bzdisk|bzlilo

 

3)

 

-> make modules

-> make modules_install

 

- make dep make clean - . make dep (.depend),

. , . make clean, () , .

, . 3- : make bzImage, make bzdisk make bzlilo. - ,

.

:

make bzImage - , . , /usr/src/linux/arch/i386/boot. bzImage. lilo|grub .

make bzdisk - - , bzImage, . .

make bzlilo - , lilo. map- . , , . bzImage , . / vmlinuz ( vmlinuz).

.

2- make modules make modules_install. make modules : , , . make modules_install, , /lib/modules/<kernel-version>/kernel/<module-type>. (<module-type>) , (: block, misk, net, pcmcia, etc...).


14) UNIX (Linux).

- , . , 0- .

:

− (VFS)

− (syscall API)

(, , ), .

, , . , .

, , , .

, - , . , .

, , .


15) GNU/Linux .

Gdb, DDB

Gdb -k kernel

gdb -k , , . .

, , DDB. , , . , , gdb.

DDB,

options DDB

, .

, DDB , DDB. , , -d . DDB . / .

. . , :

# sysctl debug.enter_debugger=ddb

³ Linux.

− - printk([<n>]"message");

− /proc create_proc_read_entry()

− ioctl()

− gdb

 


16) UNIX.

(Virtual File System) , . VFS, .

VFS , open(), read() write(), . , , : VFS , . Unix.

, . , " ", " " . . , . write(f, &buf, len) :

VFS . , : , . VFS:

− (superblock), .

− (inode), .

− (dentry), . dentry , .

− (file), , .

VFS , , :

− super_operations ( ). , .

− inode_operations ( ). , .

− dentry_operations ( ). , .

− file_operations ( ). , .


17) GNU/Linux .

Linux .

. , , . . , , , ( ) .

, , "", " ", , . , , : - -. , open, close, read write, .

ioctl -, . , .

-:

− check_region() - /

− request_region() -

− release_region() -

− inb()/outb() - /

− inw()/outw() - (16)

− inl()/outl() - (32)

− insb()/outsb() . . - /

− rmb()/wmb()/mb() - , () , .

− (I/O memory) - check_mem_region(), readb()/writeb(),

#include <linux/sched.h> // #include <linux/interrupt.h> // #include <asm/io.h> // #include <linux/ioport.h>// -#include <linux/kernel.h>//

18) , GNU/Linux.

Makefile:

 

obj-m += hello-1.o

 

, , make -C /usr/src/linux-`uname -r` SUBDIRS=$PWD modules.

:

gcc -O -Wall -DMODULE -D__KERNEL__ -I/usr/src/linux/include\ -c mymodule.c

root. insmod < >.

( root) rmmod < >.

lsmod, /proc/modules.


19) GNU/Linux.

Linux . init_module() exit_module() . . , sys_init_module , ( capable). load_module, . load_module , . , , , . init() , , .

MODULE_LICENSE(), MODULE_AUTHOR(DRIVER_AUTHOR), MODULE_DESCRIPTION(DRIVER_DESC).


20) UNIX .

UNIX . , , . , /dev , . , , .

. . , , , , . UNIX . /dev. /dev. , di_mode . , . . . , di_addr , , : struct {char di_minor; char di_major;};

di_major /, di_minor . - .

" " . -- " ". , . . . , , .

, -- . , . Unix- 1 , 2. -- , , . , .


21) GNU/Linux.

Linux iproute2.

iproute2 Linux. Linux, . iproute2 , .

iproute2 UNIX, , arp‐: ifconfig, route, arp, netstat.

:

ip , , , , arp‐, IP‐, multicast , multicast .

tc (tc traffic control). , ( ), , , QoS :

− ( ToS IP‐, IP‐)

− , , . .

ss . netstat.

iproute2 (Alexey Kuznetsov).

tc . :

qdisc - − class - , , − filters - - , ( , , , , , ...). :1) tc qdisc show [ dev DEV ] - 2) tc class show dev DEV - 3) tc filter show dev DEV - DEV () tc qdisc change(del) parent handle. , 6. 3 classfull ( ): prio, cbq, htb, 3 (classless): tbf, pfifo, sfq. Classless , classfull . 2 , classfull classless "", . , classfull ( traffic control - ). classless:1) TBF (token bucket filter) - , , (, . tbf:− limit latency - , , - , ( limit - )− burst(buffer maxburst) - , , mpu - , .− rate - − peakrate - , 1 . 2) sfq(stochastic fairness queueing - ). : , "" (, .. , ), . .. Token Ring . , , . sfq :− pertrub - , , - 0, .. , 10 ;− quantum - , , , − SFQ- : 3) - pfifo ( ) bfifo ( ). , . - limit, (pfifo) (bfifo).




:


: 2016-11-18; !; : 455 |


:

:

, , .
==> ...

1700 - | 1371 -


© 2015-2024 lektsii.org - -

: 0.077 .