You are on page 1of 4

Gestiunea memorie

Comenzi Linux
1. ps - report process status, gives a snapshot of the current processes. SYNTAX
ps [-a] [-A] [-c] [-d] [-e] [-f] [-j] [-l] [-L] [-P] [-y] [ -g grplist ] [ -n namelist ] [-o format ] [ -p proclist ] [ -s sidlist ] [ -t term] [ -u uidlist ] [ -U uidlist ] [ -G gidlist ]

-a -A -c -d -e -f -j -l -L -P -y

List information about all processes most frequently requested: all those except process group leaders and processes not associated with a terminal. List information for all processes. Identical to -e, below. Print information in a format that reflects scheduler properties as described in priocntl. The -c option affects the output of the -f and -l options, as described below. List information about all processes except session leaders. List information about every process now running. Generate a full listing. Print session ID and process group ID. Generate a long listing. Print information about each light weight process (lwp) in each selected process. Print the number of the processor to which the process or lwp is bound, if any, under an additional column header, PSR. Under a long listing (-l), omit the obsolete F and ADDR columns and include an RSS column to report the resident set size of the process. Under the -y option, both RSS and SZ will be reported in units of kilobytes instead of pages. List only process data whose group leader's ID number(s) appears in grplist. (A group leader is a process whose process ID number is identical to its process group ID number.) Specify the name of an alternative system namelist file in place of the default. This option is accepted for compatibility, but is ignored. Print information according to the format specification given in format. This is fully described in DISPLAY FORMATS. Multiple -o options can be specified; the format specification will be interpreted as the space-character-separated concatenation of all the format option-arguments. List only process data whose process ID numbers are given in proclist. List information on all session leaders whose IDs appear in sidlist. List only process data associated with term. Terminal identifiers are specified as a device file name, and an identifier. For example, term/a, or pts/0.

-g grplist -n namelist -o format

-p proclist -s sidlist -t term

-u uidlist

List only process data whose effective user ID number or login name is given in uidlist. In the listing, the numerical user ID will be printed unless you give the -f option, which prints the login name. List information for processes whose real user ID numbers or login names are given in uidlist. The uidlist must be a single argument in the form of a blank- or comma-separated list. List information for processes whose real group ID numbers are given in gidlist. The gidlist must be a single argument in the form of a blank- or comma-separated list.

-U uidlist

-G gidlist

2. free - Displays the total amount of free and used physical and swap memory in the system, as well as the buffers
used by the kernel. SYNTAX

free [-b | -k | -m] [-o] [-s delay ] [-t] [-V] -b -t -o -s -V Sswitch displays the amount of memory in bytes; the -k switch (set by default) displays it in kilobytes; the -m switch displays it in megabytes. Switch displays a line containing the totals. Switch disables the display of a "buffer adjusted" line. If the -o option is not specified, free subtracts buffer memory from the used memory and adds it to the free memory reported. Switch activates continuous polling delay seconds apart. You may actually specify any floating point number for delay, usleep is used for microsecond resolution delay times. Displays version information.

3. top - Display Linux tasks. SYNTAX top -hv | -bcisS -d delay -n iterations -p pid [, pid ...] The traditional switches '-' and whitespace are optional. -b Batch mode operation Starts top in 'Batch mode', which could be useful for sending output from top to other programs or to a file. In this mode, top will not accept input and runs until the iterations limit you've set with the '-n' command-line option or until killed. Command line/Program name toggle Starts top with the last remembered 'c' state reversed. Thus, if top was displaying command lines, now that field will show program names, and visa versa. See the 'c' interactive command for additional information. Delay time interval as: -d ss.tt (seconds.tenths) Specifies the delay between screen updates, and overrides the corresponding value in one's

-c

-d

personal configuration file or the startup default. Later this can be changed with the 'd' or 's' interactive commands. Fractional seconds are honored, but a negative number is not allowed. In all cases, however, such changes are prohibited if top is running in 'Secure mode', except for root (unless the 's' command-line option was used). For additional information on 'Secure mode' see topic 5a. SYSTEM Configuration File. -h -i Help Show library version and the usage prompt, then quit. Idle Processes toggle Starts top with the last remembered 'i' state reversed. When this toggle is Off, tasks that are idled or zombied will not be displayed. Number of iterations limit as: -n number Specifies the maximum number of iterations, or frames, top should produce before ending. Monitor by user as: -u somebody Monitor only processes with an effective UID or user name matching that given. Monitor by user as: -U somebody Monitor only processes with a UID or user name matching that given. This matches real, effective, saved, and filesystem UIDs. Monitor PIDs as: -pN1 -pN2 ... or -pN1, N2 [,...] Monitor only processes with specified process IDs. This option can be given up to 20 times, or you can provide a comma delimited list with up to 20 pids. Co-mingling both approaches is permitted. Secure mode operation Starts top with secure mode forced, even for root. This mode is far better controlled through the system configuration file (see topic 5. FILES). Cumulative time mode toggle Starts top with the last remembered 'S' state reversed. When 'Cumulative mode' is On, each process is listed with the cpu time that it and its dead children have used. See the 'S' interactive command for additional information regarding this mode. Version Show library version and the usage prompt, then quit.

-n -u -U

-p

-s

-S

-v

Comenzi Windows
1. tasklist - Displays a list of applications and services with their Process ID (PID) for all tasks running on either a local or a remote computer.

SYNTAX

tasklist[.exe] [/s computer] [/u domain\user [/p password]] [/fo {TABLE|LIST|CSV}] [/nh] [/fi FilterName [/fi FilterName2 [ ... ]]] [/m [ModuleName] | /svc | /v] /s Computer : Specifies the name or IP address of a remote computer (do not use backslashes). The default is the local computer. /u Domain\User : Runs the command with the account permissions of the user specified by User or Domain\User. The default is the permissions of the current logged on user on the computer issuing the command. /p Password : Specifies the password of the user account that is specified in the /u parameter. /fo {TABLE|LIST|CSV} : Specifies the format to use for the output. Valid values are TABLE, LIST, and CSV. The default format for output is TABLE. /nh : Suppresses column headers in the output. Valid when the /fo parameter is set to TABLE or CSV. /fi FilterName : Specifies the types of process(es) to include in or exclude from the query. The following table lists valid filter names, operators, and values.

You might also like