Commands

Commands

depmod

[ -a ]

depmod

[ -a version ]

depmod

module1.o module2.o

modprobe

module.o [symbol=value ]

modprobe

-t tag pattern

modprobe

-a -t tag pattern

modprobe

-l [ -t tag ] pattern

modprobe

-r module

modprobe

-c

The depmod and modprobe commands are used to manage a modular Linux kernel.

The depmod command is used to create a Makefile-esque dependency (modules.dep) file, based on the symbols it finds in the set of modules mentioned in the command line. The resultant file can be used by modprobe to automatically load the relevant modules.

Modprobe will load modules in one of two ways:

         It will attempt to load all the modules in a list and stop as soon as one of them uccessfully loads (useful for loading a single device driver)

         It can load all the modules in a list (useful at boot time)

Example: To create a list of all modules on the system, use

depmod -a

Example: To load the module cdrom.o, use

modprobe cdrom.o

-a

Work on all modules.

-r

Automatically load a stack of modules.

-l

List available modules.

-t

Limit activity to modules of the specified type.

-c

Display configuration information.

-d

Display debug mode.

insmod

[ -fkmpsxXv ] [ -o module_name ] object_file [ symbol=value ]

This command installs a loadable module in the running kernel.

This command works by resolving all symbols from the kernel's symbol table, which must be exported.

Example: To install the module rarp.o, use

insmod /lib/modules/preferred/ipv4/rarp.o

-f

Force the load even if the running kernel and the kernel version for which the module was compiled do not match.

-k

Set the auto-clean flag on the module.

-m

Output a load map.

-o

Explicitly name the module, rather than deriving the name from the base name of the source object file.

-p

Probe the module to see if it could be successfully loaded.

-s

Output everything to syslog(3), instead of the terminal.

-v

Display verbose operation.

-X,

Export all the module's external symbols.

-x

Do not export all the module's external symbols.

kerneld

[ debug ] [ keep ] [ delay=<seconds> ] [ type=<message number> ]

This command performs kernel tasks (such as loading and unloading modules) in user space. Typically, this daemon is used for loading and unloading modules.

Example: To invoke kerneld in debug mode, use

kerneld debug

debug

Display debug mode.

Keep

Ignore all requests for unloading modules.

delay=<seconds>

Delay the removal of modules for the specified number of seconds (60 by default).

Type=<message type>

Listen for all messages whose type is less than or equal to <message type>.

ksyms

[ -a ] [ -h ] [ -m ]

This command displays exported kernel symbols (e.g., program variables, function names).

Example: To display the kernel symbol table, use

ksyms -a

-a

Display all symbols, including those from the kernel proper.

-h

Suppress the column header.

-m

Display module information.

lsmod

Displays information about loaded modules.

Example: To display information (Module Name, Memory Pages, Used by) about the loaded modules on a system, use

lsmod

bdflush

[opt]

Flushes dirty (used since last flush) buffers back to disk.

Example: To flush the used buffers back to disk, use

bdflush

-d

Display kernel parameters.

-h

Display help information.

-s<seconds>

Call sync every <seconds> seconds.

-f<seconds>

Call flush every <seconds> seconds.

-0

Invoke max fraction of LRU list to examine for dirty blocks.

-1

Invoke max number of dirty blocks to write each time bdflush activated.

-2

Display number of clean buffers to be loaded onto free list by refill_freelist.

-3

Display dirty block threshold for activating bdflush in refill_freelist.

-4

Display percentage of cache to scan for free clusters.

-5

Display time for data buffers to age before flushing.

-6

Display time for nondata (dir, bitmap, etc.) buffers to age before flushing.

-7

Display time buffer cache load average constant.

-8

Display LAV ratio (used to determine threshold for buffer fratricide).

rmmod

[-as] module

This command removes the specified module from the running kernel.

Example: To remove the rarp module from the running kernel, use

rmmod rarp

Example: To remove the unused modules from the running kernel, use

rmmod -a

-a

Attempt to remove all unused modules.

-s

Direct output to the system log, rather than the terminal.

 



Linux Desk Reference
Linux Desk Reference (2nd Edition)
ISBN: 0130619892
EAN: 2147483647
Year: 2000
Pages: 174
Authors: Scott Hawkins

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net