Home Database Mysql Tutorial AIX/LINUX如何查看单个进程在os层面的内存消耗

AIX/LINUX如何查看单个进程在os层面的内存消耗

Jun 07, 2016 pm 03:55 PM
linux Memory how Check consume process

--如何查看单个进程在os层面的内存消耗 AIX: $ svmon -Pt10 | perl -e while(){print if($.==2||$!$s++);$.=0 if(/^-+$/)} ---- -用这个可以看最大的占用内存的10个进程 -------------------------------------------------------------------------------

--如何查看单个进程在os层面的内存消耗

AIX:

$ svmon -Pt10 | perl -e 'while(){print if($.==2||$&&&!$s++);$.=0 if(/^-+$/)}' ---- -用这个可以看最大的占用内存的10个进程
-------------------------------------------------------------------------------
Pid Command Inuse Pin Pgsp Virtual 64-bit Mthrd 16MB
5111942 svmon 22446 8768 0 22370 Y N N
4391128 ksh 18298 8724 0 18232 N N N
5308430 perl5.8.8 18262 8724 0 18245 N N N

AIX:(linux 下也可以使用)
$ ps gv
PID TTY STAT TIME PGIN SIZE RSS LIM TSIZ TRS %CPU %MEM COMMAND
0 - A 0:51 7 384 384 xx 0 0 0.0 0.0 swapper
1 - A 5:26 105 752 796 32768 31 44 0.0 0.0 /etc/in
131076 - A 5478:05 0 448 448 xx 0 0 25.8 0.0 wait
196614 - A 0:00 0 448 448 xx 0 0 0.0 0.0 sched
262152 - A 0:00 0 512 512 xx 0 0 0.0 0.0 lrud
327690 - A 0:00 0 448 448 xx 0 0 0.0 0.0 vmptacrt
393228 - A 0:00 0 512 512 xx 0 0 0.0 0.0 psmd
458766 - A 0:00 0 896 896 xx 0 0 0.0 0.0 vmmd
524304 - A 0:00 0 448 448 xx 0 0 0.0 0.0 memgrdd
589842 - A 0:00 0 448 448 xx 0 0 0.0 0.0 lsareapr

aix 下查看耗费内存最大的前10个进程
$ ps gv|sort -rn +6|head -10 --------------这个也是非常直观
4128976 - A 1:06 2743 42476 42548 32768 68 72 0.0 4.0 /usr/ja
2687164 - A 0:09 31 9000 9084 32768 60 84 0.0 1.0 /usr/sb
2883710 - A 0:00 37 5696 5904 32768 518 208 0.0 0.0 /usr/sb
3014794 - A 0:01 55 5672 5892 32768 394 220 0.0 0.0 /usr/sb
3145838 - A 0:00 32 5540 5668 32768 164 128 0.0 0.0 /usr/sb
3080322 - A 0:00 24 5472 5528 32768 43 56 0.0 0.0 /usr/sb
4194350 - A 0:05 412 4708 5248 xx 555 540 0.0 0.0 /usr/sb
3407976 - A 0:06 144 4180 5244 32768 1213 1064 0.0 0.0 sendmai
3866866 - A 0:00 129 3792 4400 32768 524 608 0.0 0.0 /usr/sb
2424972 - A 0:00 76 4204 4384 32768 151 180 0.0 0.0 /usr/sb

$

aix、linux ---------------建议使用这个

$ ps aux | head -1 ; ps aux | sort -rn +3 | head -10
USER PID %CPU %MEM SZ RSS TTY STAT STIME TIME COMMAND
pconsole 4128976 0.0 4.0 42540 42548 - A Apr 11 1:06 /usr/java5/bin/
root 2687164 0.0 1.0 9056 9084 - A Apr 11 0:09 /usr/sbin/cron
root 5636150 0.0 0.0 3928 3940 - A 22:37:25 0:00 telnetd -a
root 5046428 0.0 0.0 1628 1652 - A Apr 11 0:00 /usr/sbin/rsct/
root 4849856 0.0 0.0 2624 2140 - A Apr 11 0:00 /usr/sbin/rsct/
root 4784276 0.0 0.0 344 348 - A Apr 11 0:00 /usr/sbin/rpc.l
root 4718738 0.0 0.0 1216 1216 - A Apr 11 0:17 rpc.lockd
root 4653208 0.0 0.0 108 112 - A Apr 11 0:00 /usr/sbin/uprin
root 4587674 0.0 0.0 332 340 - A Apr 11 0:00 /usr/sbin/write
root 4456616 0.0 0.0 4064 3904 - A Apr 11 0:25 /usr/bin/topasr


$ svmon -uP -t 50|grep -p Pid|grep '^.*[0-9] '
5112000 svmon 22452 8768 0 22370 Y N N
4391128 ksh 18298 8724 0 18232 N N N
5308462 grep 18163 8724 0 18154 N N N
5767348 grep 18163 8724 0 18154 N N N
$ svmon -P -O summary=basic,unit=MB
Unit: MB

-------------------------------------------------------------------------------
Pid Command Inuse Pin Pgsp Virtual
5112002 svmon 87.7 34.2 0 87.4
4391128 ksh 71.5 34.1 0 71.2
$

$ svmon -U `ps -ef|cut -c1-8|sort -u`-O segment=off -O unit=MB
Unit: MB
===============================================================================
User Inuse Pin Pgsp Virtual
oracle 121.07 34.3 0 120.49
segment=off *** user does not exist ***
pconsole-O *** user does not exist ***
daemon *** user does not exist ***
root *** user does not exist ***
UID *** user does not exist ***

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

deepseek web version entrance deepseek official website entrance deepseek web version entrance deepseek official website entrance Feb 19, 2025 pm 04:54 PM

DeepSeek is a powerful intelligent search and analysis tool that provides two access methods: web version and official website. The web version is convenient and efficient, and can be used without installation; the official website provides comprehensive product information, download resources and support services. Whether individuals or corporate users, they can easily obtain and analyze massive data through DeepSeek to improve work efficiency, assist decision-making and promote innovation.

How to install deepseek How to install deepseek Feb 19, 2025 pm 05:48 PM

There are many ways to install DeepSeek, including: compile from source (for experienced developers) using precompiled packages (for Windows users) using Docker containers (for most convenient, no need to worry about compatibility) No matter which method you choose, Please read the official documents carefully and prepare them fully to avoid unnecessary trouble.

Ouyi okx installation package is directly included Ouyi okx installation package is directly included Feb 21, 2025 pm 08:00 PM

Ouyi OKX, the world's leading digital asset exchange, has now launched an official installation package to provide a safe and convenient trading experience. The OKX installation package of Ouyi does not need to be accessed through a browser. It can directly install independent applications on the device, creating a stable and efficient trading platform for users. The installation process is simple and easy to understand. Users only need to download the latest version of the installation package and follow the prompts to complete the installation step by step.

BITGet official website installation (2025 beginner's guide) BITGet official website installation (2025 beginner's guide) Feb 21, 2025 pm 08:42 PM

BITGet is a cryptocurrency exchange that provides a variety of trading services including spot trading, contract trading and derivatives. Founded in 2018, the exchange is headquartered in Singapore and is committed to providing users with a safe and reliable trading platform. BITGet offers a variety of trading pairs, including BTC/USDT, ETH/USDT and XRP/USDT. Additionally, the exchange has a reputation for security and liquidity and offers a variety of features such as premium order types, leveraged trading and 24/7 customer support.

Get the gate.io installation package for free Get the gate.io installation package for free Feb 21, 2025 pm 08:21 PM

Gate.io is a popular cryptocurrency exchange that users can use by downloading its installation package and installing it on their devices. The steps to obtain the installation package are as follows: Visit the official website of Gate.io, click "Download", select the corresponding operating system (Windows, Mac or Linux), and download the installation package to your computer. It is recommended to temporarily disable antivirus software or firewall during installation to ensure smooth installation. After completion, the user needs to create a Gate.io account to start using it.

Ouyi Exchange Download Official Portal Ouyi Exchange Download Official Portal Feb 21, 2025 pm 07:51 PM

Ouyi, also known as OKX, is a world-leading cryptocurrency trading platform. The article provides a download portal for Ouyi's official installation package, which facilitates users to install Ouyi client on different devices. This installation package supports Windows, Mac, Android and iOS systems. Users can choose the corresponding version to download according to their device type. After the installation is completed, users can register or log in to the Ouyi account, start trading cryptocurrencies and enjoy other services provided by the platform.

Why does an error occur when installing an extension using PECL in a Docker environment? How to solve it? Why does an error occur when installing an extension using PECL in a Docker environment? How to solve it? Apr 01, 2025 pm 03:06 PM

Causes and solutions for errors when using PECL to install extensions in Docker environment When using Docker environment, we often encounter some headaches...

How to automatically set permissions of unixsocket after system restart? How to automatically set permissions of unixsocket after system restart? Mar 31, 2025 pm 11:54 PM

How to automatically set the permissions of unixsocket after the system restarts. Every time the system restarts, we need to execute the following command to modify the permissions of unixsocket: sudo...

See all articles