- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: sort -rnk2 usage way ans sz size
Operating System - Linux
1752582
Members
5008
Online
108788
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-31-2005 06:27 PM
тАО10-31-2005 06:27 PM
I test two command(sort -rnk2 and sort -rn)
I want to know how different from
and I want to know how do I understand sz size. is it kylobytes?
root@:/]# UNIX95= ps -e -o ruser,sz,pid,args|sort -rn| head -10
root 2628 1320 /opt/perf/bin/midaemon
root 1587 1190 /opt/wbem/sbin/cimserver
root 918 1351 /opt/perf/bin/scopeux
root 715 1621 /opt/perf/bin/rep_server -t SCOPE /var/opt/perf/datafiles/loggl
root 658 1452 /opt/VRTSob/bin/vxsvc -r /opt/VRTSob/config/Registry
root 532 1363 /usr/sbin/swagentd -r
root 526 1187 /opt/dce/sbin/rpcd
root 455 1105 /usr/sbin/snmpdm
root 453 1624 /opt/perf/bin/alarmgen -svr 1623 -t alarmgen /var/opt/perf/data
root 442 24416 sshd: oracle@1
----------------------------------------------
root@:/]# UNIX95= ps -e -o ruser,sz,pid,args|sort -rnk2| head -10
oracle 31820 2473 ora_arc1_CDR
oracle 31820 2471 ora_arc0_CDR
oracle 31820 2463 ora_lgwr_CDR
oracle 30540 2461 ora_dbw1_CDR
oracle 30540 2459 ora_dbw0_CDR
oracle 30472 2457 ora_pmon_CDR
oracle 30320 24753 oracleCDR (LOCAL=NO)
oracle 30320 22939 oracleCDR (LOCAL=NO)
oracle 30304 22941 oracleCDR (LOCAL=NO)
oracle 30304 22651 oracleCDR (LOCAL=NO)
I want to know how different from
and I want to know how do I understand sz size. is it kylobytes?
root@:/]# UNIX95= ps -e -o ruser,sz,pid,args|sort -rn| head -10
root 2628 1320 /opt/perf/bin/midaemon
root 1587 1190 /opt/wbem/sbin/cimserver
root 918 1351 /opt/perf/bin/scopeux
root 715 1621 /opt/perf/bin/rep_server -t SCOPE /var/opt/perf/datafiles/loggl
root 658 1452 /opt/VRTSob/bin/vxsvc -r /opt/VRTSob/config/Registry
root 532 1363 /usr/sbin/swagentd -r
root 526 1187 /opt/dce/sbin/rpcd
root 455 1105 /usr/sbin/snmpdm
root 453 1624 /opt/perf/bin/alarmgen -svr 1623 -t alarmgen /var/opt/perf/data
root 442 24416 sshd: oracle@1
----------------------------------------------
root@:/]# UNIX95= ps -e -o ruser,sz,pid,args|sort -rnk2| head -10
oracle 31820 2473 ora_arc1_CDR
oracle 31820 2471 ora_arc0_CDR
oracle 31820 2463 ora_lgwr_CDR
oracle 30540 2461 ora_dbw1_CDR
oracle 30540 2459 ora_dbw0_CDR
oracle 30472 2457 ora_pmon_CDR
oracle 30320 24753 oracleCDR (LOCAL=NO)
oracle 30320 22939 oracleCDR (LOCAL=NO)
oracle 30304 22941 oracleCDR (LOCAL=NO)
oracle 30304 22651 oracleCDR (LOCAL=NO)
Solved! Go to Solution.
- Tags:
- Sort
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-31-2005 08:21 PM
тАО10-31-2005 08:21 PM
Solution
when you use sort -kX, you are defining the position of the sort key (text delineated by blank characters).
Using sort -rnk2 you sort ps output by PID in reverse order.
The SZ field displays the size of the process in memory. The value of the field is the number of pages the process is occupying. On both the Linux and HP machines, a page is 4,096 bytes.
Regards,
Sergejs
Using sort -rnk2 you sort ps output by PID in reverse order.
The SZ field displays the size of the process in memory. The value of the field is the number of pages the process is occupying. On both the Linux and HP machines, a page is 4,096 bytes.
Regards,
Sergejs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-01-2005 05:17 PM
тАО11-01-2005 05:17 PM
Re: sort -rnk2 usage way ans sz size
I had compared glance and ps due to memory size.
first of all,glance is like this.
Resources PID: 10683, oracleSTBYDB PPID: 1 euid: 200 User: oracle
--------------------------------------------------------------------------------
CPU Usage (util): 0.0 Log Reads : 0 Wait Reason : STRMS
User/Nice/RT CPU: 0.0 Log Writes: 2 Total RSS/VSS :100.4mb/112.1mb
System CPU : 0.0 Phy Reads : 1 Traps / Vfaults: 0/ 0
Interrupt CPU : 0.0 Phy Writes: 34 Faults Mem/Disk: 0/ 0
Cont Switch CPU : 0.0 FS Reads : 1 Deactivations : 0
Scheduler : HPUX FS Writes : 34 Forks & Vforks : 0
Second,ps command like this.
root@stby:/]# UNIX95= ps -e -o ruser,sz,vsz,pid,ppid,args|sort -rnk2|head -5
oracle 36940 147760 19792 1 oracleSTBYDB (LOCAL=NO)
oracle 36940 147760 10683 1 oracleSTBYDB (LOCAL=NO)
oracle 35916 147760 8495 1 ora_mrp0_STBYDB
oracle 31820 131376 19794 1 oracleSTBYDB (LOCAL=NO)
oracle 31820 131376 10956 1 oracleSTBYDB (LOCAL=NO)
same pid present differently between sz and rss , vsz and VSS.
How can I understand this?
Thanks.
first of all,glance is like this.
Resources PID: 10683, oracleSTBYDB PPID: 1 euid: 200 User: oracle
--------------------------------------------------------------------------------
CPU Usage (util): 0.0 Log Reads : 0 Wait Reason : STRMS
User/Nice/RT CPU: 0.0 Log Writes: 2 Total RSS/VSS :100.4mb/112.1mb
System CPU : 0.0 Phy Reads : 1 Traps / Vfaults: 0/ 0
Interrupt CPU : 0.0 Phy Writes: 34 Faults Mem/Disk: 0/ 0
Cont Switch CPU : 0.0 FS Reads : 1 Deactivations : 0
Scheduler : HPUX FS Writes : 34 Forks & Vforks : 0
Second,ps command like this.
root@stby:/]# UNIX95= ps -e -o ruser,sz,vsz,pid,ppid,args|sort -rnk2|head -5
oracle 36940 147760 19792 1 oracleSTBYDB (LOCAL=NO)
oracle 36940 147760 10683 1 oracleSTBYDB (LOCAL=NO)
oracle 35916 147760 8495 1 ora_mrp0_STBYDB
oracle 31820 131376 19794 1 oracleSTBYDB (LOCAL=NO)
oracle 31820 131376 10956 1 oracleSTBYDB (LOCAL=NO)
same pid present differently between sz and rss , vsz and VSS.
How can I understand this?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-01-2005 05:25 PM
тАО11-01-2005 05:25 PM
Re: sort -rnk2 usage way ans sz size
The sz size is in buff pages. One buffer is of 4096bytes size.
-rnk2 --> will sort on numerical second column and reverse the order.
-rn --> will sort on first numerical column and reverse the order.
-rnk2 --> will sort on numerical second column and reverse the order.
-rn --> will sort on first numerical column and reverse the order.
There is no substitute to HARDWORK
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP