cancel
Showing results for 
Search instead for 
Did you mean: 

Need to clean the system

HPlowSkill
Occasional Advisor

Need to clean the system

Hi all,

I really need to clean an HP-UX system, because we do not have enough memory.

Here is a list of running processes, may you help me by telling me which of them i can kill?

vxfsd - sh - vxsvc - samd - top - psmctd - top - unhashdaemon - statdaemon - top - vxsvc - samd - sh - top - cimserver - memlogd - psmctd - syncer - unhashdaemon - statdaemon - netfmt - swapper - smpsched - smpsched - lvmdevd - lvmdevd - dmprestored - syslogd - rpc.statd - rpc.lockd - automount - inetd - sendmail: - snmpdm - mib2agt - rpcd - cimserver - xntpd - pwgrd - swagentd - telnetd - sh - cclogd - diaglogd - xntpd - pwgrd - diagmond - swagentd - telnetd - sh - cclogd - diaglogd - registrar - nfsd - prngd - krsd - cimserverd - dtlogin - p_client - disk_em - dm_core_hw - sh - dm_memory - ksh - getty - supsched - strmem - strweld - strfreebd - ttisr - ioconfigd - lvmschedd - sblksched - sblksched - lvmattachd - lvmattachd - ptydaemon - nktl_daemon - ntl_reader - rpcbind - nfskd - biod - biod - biod - biod - biod - biod - biod - biod - biod - biod - biod - biod - biod - biod - biod - biod - hp_unixagt - trapdestagt - fddi4subagt - cron - envd - emsagent - rpc.mountd - nfsd - nfsd - nfsd - nfsd - nfsd - nfsd - nfsd - nfsd - nfsd - nfsd - nfsd - nfsd - nfsd - nfsd - nfsd - nfsd - sh - sfd

Sorry for my bad skill in english.

Thanks a lot
18 REPLIES
avizen9
Esteemed Contributor

Re: Need to clean the system

Hello
its very difficult to tell which proccess need to kill,

please post below output which can help us to undestand more about your issue.

who -d
ps -ef
bdf
sar 5 5
top
smatador
Honored Contributor

Re: Need to clean the system

Hi,
After killing some process, you have to know which of them get a lot of memory.
So I suggest you first to kill top process and stop diagnostic. After that if you have less memory pressure, check the sh process.
What is the release, the amount of ram ...
HPlowSkill
Occasional Advisor

Re: Need to clean the system

I understand :)

# who -d
vxenable . Apr 16 15:33
bcheckrc . Apr 16 15:34
cat . Apr 16 15:34
rm . Apr 16 15:34
sh . Apr 16 15:34
sh . Apr 16 15:34
rc . Apr 16 15:35
sh . Apr 16 15:35
. ttyp1 Apr 21 19:02
root ttyp2 Apr 21 16:33
ljb pts/td Apr 28 10:31
root pts/te Apr 27 20:44

ps -ef
root 0 0 0 Apr 16 ? 0:30 swapper
root 8 0 0 Apr 16 ? 0:00 supsched
root 9 0 0 Apr 16 ? 0:00 strmem
root 10 0 0 Apr 16 ? 0:00 strweld
root 11 0 0 Apr 16 ? 0:00 strfreebd
root 2 0 0 Apr 16 ? 0:03 vhand
root 3 0 0 Apr 16 ? 2:26 statdaemon
root 4 0 0 Apr 16 ? 0:08 unhashdaemon
root 12 0 0 Apr 16 ? 0:00 ttisr
root 13 0 0 Apr 16 ? 0:00 ioconfigd
root 1 0 0 Apr 16 ? 0:00 init
root 19 0 0 Apr 16 ? 0:00 lvmkd
root 20 0 0 Apr 16 ? 0:00 lvmkd
root 21 0 0 Apr 16 ? 0:00 lvmkd
root 22 0 0 Apr 16 ? 0:00 lvmkd
root 23 0 0 Apr 16 ? 0:00 lvmkd
root 24 0 0 Apr 16 ? 0:00 lvmkd
root 25 0 0 Apr 16 ? 0:00 lvmschedd
root 26 0 0 Apr 16 ? 0:00 smpsched
root 27 0 0 Apr 16 ? 0:00 smpsched
root 28 0 0 Apr 16 ? 0:00 sblksched
root 29 0 0 Apr 16 ? 0:00 sblksched
root 30 0 0 Apr 16 ? 0:02 lvmdevd
root 31 0 0 Apr 16 ? 0:00 lvmattachd
root 29495 1 0 Apr 22 console 0:00 /usr/sbin/getty console console
root 691 1 0 Apr 16 ? 0:00 /usr/sbin/biod 16
root 453 0 0 Apr 16 ? 0:00 dmprestored
root 37 0 0 Apr 16 ? 5:52 vxfsd
root 65 0 0 Apr 16 ? 0:02 lvmdevd
root 66 0 0 Apr 16 ? 0:00 lvmattachd
root 437 1 0 Apr 16 ? 2:14 /usr/sbin/syncer
root 719 1 0 Apr 16 ? 0:00 /usr/sbin/rpc.lockd
root 534 1 0 Apr 16 ? 0:01 /usr/sbin/syslogd -D
root 537 1 0 Apr 16 ? 0:00 /usr/sbin/ptydaemon
root 1143 1 0 Apr 16 ? 0:29 /usr/sbin/pwgrd
root 559 1 0 Apr 16 ? 0:00 /usr/lbin/nktl_daemon 0 0 0 0 0 1 -2 0
root 675 0 0 Apr 16 ? 0:00 nfskd
root 569 1 0 Apr 16 ? 0:00 /usr/lbin/ntl_reader 0 1 1 1 1000 2 /var/adm/nettl /var/adm/con
root 570 569 0 Apr 16 ? 0:44 /usr/sbin/netfmt -C -F -f /var/adm/nettl.LOG000 -c /var/adm/con
root 670 1 0 Apr 16 ? 0:00 /usr/sbin/rpcbind
root 692 1 0 Apr 16 ? 0:00 /usr/sbin/biod 16
root 690 1 0 Apr 16 ? 0:00 /usr/sbin/biod 16
root 693 1 0 Apr 16 ? 0:00 /usr/sbin/biod 16
root 694 1 0 Apr 16 ? 0:00 /usr/sbin/biod 16
root 695 1 0 Apr 16 ? 0:00 /usr/sbin/biod 16
root 696 1 0 Apr 16 ? 0:00 /usr/sbin/biod 16
root 697 1 0 Apr 16 ? 0:00 /usr/sbin/biod 16
root 698 1 0 Apr 16 ? 0:00 /usr/sbin/biod 16
root 699 1 0 Apr 16 ? 0:00 /usr/sbin/biod 16
root 700 1 0 Apr 16 ? 0:00 /usr/sbin/biod 16
root 701 1 0 Apr 16 ? 0:00 /usr/sbin/biod 16
root 702 1 0 Apr 16 ? 0:00 /usr/sbin/biod 16
root 703 1 0 Apr 16 ? 0:00 /usr/sbin/biod 16
root 704 1 0 Apr 16 ? 0:00 /usr/sbin/biod 16
root 705 1 0 Apr 16 ? 0:00 /usr/sbin/biod 16
root 730 1 0 Apr 16 ? 0:01 /usr/lib/netsvc/fs/automount/automount -f /etc/auto_master
root 713 1 0 Apr 16 ? 0:00 /usr/sbin/rpc.statd
root 1023 1 0 Apr 16 ? 2:26 sendmail: accepting connections on port 25
root 1033 1 0 Apr 16 ? 0:40 /usr/sbin/snmpdm
root 750 1 0 Apr 16 ? 0:15 /usr/sbin/inetd
root 1046 1 0 Apr 16 ? 0:00 /usr/sbin/hp_unixagt
root 1055 1 0 Apr 16 ? 1:12 /usr/sbin/mib2agt
root 1064 1 0 Apr 16 ? 0:00 /usr/sbin/trapdestagt
root 1089 1 0 Apr 16 ? 0:00 /usr/sbin/fddi4subagt
root 1104 1 0 Apr 16 ? 0:14 /opt/dce/sbin/rpcd
root 1107 1 0 Apr 16 ? 3:35 /opt/wbem/sbin/cimserver
root 1195 1 0 Apr 16 ? 0:00 /usr/sbin/envd
root 1131 1 0 Apr 16 ? 0:35 /usr/sbin/xntpd
root 1341 1190 0 Apr 16 ? 0:09 diaglogd
root 2921 2920 0 Apr 16 pts/ta 0:00 -sh
root 1396 1 0 Apr 16 ? 0:31 /opt/VRTSob/bin/vxsvc -r /opt/VRTSob/config/Registry
root 1340 1190 0 Apr 16 ? 0:40 cclogd
root 1213 1 0 Apr 16 ? 0:11 /usr/sbin/swagentd -r
root 1163 1 0 Apr 16 ? 0:00 /usr/sbin/cron
root 1343 1190 0 Apr 16 ? 6:15 psmctd
root 1263 1 0 Apr 16 ? 0:00 /etc/opt/resmon/lbin/emsagent
root 1900 1 0 Apr 16 ? 0:20 /usr/sbin/stm/uut/bin/tools/monitor/ia64_corehw
root 1190 1 0 Apr 16 ? 1:10 /usr/sbin/stm/uut/bin/sys/diagmond
root 1342 1190 0 Apr 16 ? 0:04 memlogd
root 1440 1429 0 Apr 16 ? 0:00 /usr/sbin/nfsd 16
root 1438 1429 0 Apr 16 ? 0:00 /usr/sbin/nfsd 16
root 1350 750 0 Apr 16 ? 0:00 /etc/opt/resmon/lbin/registrar
root 1413 1 0 Apr 16 ? 0:00 /usr/sbin/rpc.mountd
root 2595 2921 0 Apr 23 pts/ta 0:00 ksh
root 1246 750 0 08:58:10 pts/tf 0:00 telnetd
root 1430 1429 0 Apr 16 ? 0:00 /usr/sbin/nfsd 16
root 1357 1247 0 09:14:22 pts/tf 0:05 top -u
root 1620 1 0 Apr 16 ? 0:01 /usr/sbin/stm/uut/bin/tools/monitor/disk_em
root 1441 1429 0 Apr 16 ? 0:00 /usr/sbin/nfsd 16
root 1439 1430 0 Apr 16 ? 0:00 /usr/sbin/nfsd 16
root 1428 1 0 Apr 16 ? 0:00 /usr/sbin/nfsd 16
root 1429 1 0 Apr 16 ? 0:00 /usr/sbin/nfsd 16
root 1431 1430 0 Apr 16 ? 0:00 /usr/sbin/nfsd 16
root 1432 1429 0 Apr 16 ? 0:00 /usr/sbin/nfsd 16
root 1433 1430 0 Apr 16 ? 0:00 /usr/sbin/nfsd 16
root 1434 1430 0 Apr 16 ? 0:00 /usr/sbin/nfsd 16
root 1435 1429 0 Apr 16 ? 0:00 /usr/sbin/nfsd 16
root 1436 1430 0 Apr 16 ? 0:00 /usr/sbin/nfsd 16
root 1437 1430 0 Apr 16 ? 0:00 /usr/sbin/nfsd 16
root 1492 1 0 Apr 16 ? 0:54 /opt/openssl/prngd/prngd -n -c /opt/openssl/prngd/prngd.conf /v
root 1497 1 0 Apr 16 ? 0:00 /sbin/krsd -i
root 1445 1430 0 Apr 16 ? 0:00 /usr/sbin/nfsd 16
root 1482 1 0 Apr 16 ? 0:00 /sbin/sh /usr/dt/bin/dtrc
root 1447 1429 0 Apr 16 ? 0:00 /usr/sbin/nfsd 16
root 1448 1429 0 Apr 16 ? 0:00 /usr/sbin/nfsd 16
root 1504 1482 0 Apr 16 ? 0:00 /usr/dt/bin/dtlogin
root 1498 1 0 Apr 16 ? 0:00 /sbin/sfd
root 1499 1 0 Apr 16 ? 0:06 /usr/sam/lbin/samd
root 1500 1 0 Apr 16 ? 0:06 /opt/wbem/sbin/cimserverd
root 1506 1 0 Apr 16 ? 0:36 /etc/opt/resmon/lbin/p_client
root 1875 1874 0 10:53:34 pts/tc 0:00 -sh
root 1730 1 0 10:11:06 ? 0:00 /bin/sh ./startyas
root 1927 1 0 Apr 16 ? 2:05 /usr/sbin/stm/uut/bin/tools/monitor/lpmc_em
root 1874 750 0 10:53:34 pts/tc 0:00 telnetd
root 1247 1246 0 08:58:10 pts/tf 0:00 -sh
root 1701 1 0 Apr 16 ? 1:15 /usr/sbin/stm/uut/bin/tools/monitor/dm_core_hw
root 1764 1 0 Apr 16 ? 0:00 /usr/sbin/stm/uut/bin/tools/monitor/dm_memory
ljb 5077 5076 0 Apr 17 pts/tb 0:00 -ksh
root 1892 1875 2 10:54:38 pts/tc 0:00 ps -ef
root 1858 1 0 Apr 16 ? 0:03 /usr/sbin/stm/uut/bin/tools/monitor/fpl_em
root 1978 1 0 Apr 16 ? 0:03 /usr/sbin/stm/uut/bin/tools/monitor/sysstat_em
root 5076 750 0 Apr 17 pts/tb 0:00 telnetd
root 2920 750 0 Apr 16 pts/ta 0:00 telnetd
HPlowSkill
Occasional Advisor

Re: Need to clean the system

Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 212992 135304 77152 64% /
/dev/vg00/lvol1 298928 39832 229200 15% /stand
/dev/vg00/lvol8 4718592 847536 3841696 18% /var
/dev/vg00/lvol7 5357568 1367680 3958760 26% /usr
/dev/vg00/lvol4 524288 23768 497696 5% /tmp
/dev/vg00/lvol6 3145728 1730688 1404008 55% /opt
/dev/vg00/lvol5 1048576 741112 305096 71% /home
/dev/vg01/Disk2 35737600 22901112 12736208 64% /Disk2
/dev/vg01/Disk1 35840000 16265184 19431200 46% /Disk1
HPlowSkill
Occasional Advisor

Re: Need to clean the system

CPU TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %CPU COMMAND
0 ? 37 root 152 20 6464K 6464K run 5:52 0.35 0.35 vxfsd
0 ? 1701 root 154 20 4008K 444K sleep 1:15 0.28 0.28 dm_core_hw
0 pts/tc 1923 root 178 20 7224K 5220K run 0:00 0.67 0.20 top
0 ? 1396 root 152 20 24772K 1952K run 0:31 0.10 0.10 vxsvc
0 ? 1499 root 152 20 15380K 1200K run 0:06 0.10 0.10 samd
0 pts/tf 1357 root 168 20 7156K 5156K sleep 0:05 0.07 0.07 top
0 ? 1023 root 154 20 3716K 340K sleep 2:26 0.07 0.07 sendmail:
1 ? 1107 root 152 20 16952K 640K run 3:35 0.06 0.06 cimserver
1 ? 1340 root 158 10 2608K 112K sleep 0:40 0.05 0.05 cclogd
0 ? 437 root 152 20 2108K 76K run 2:14 0.04 0.04 syncer
1 ? 1033 root 154 20 12992K 756K sleep 0:40 0.04 0.04 snmpdm
1 ? 1343 root 154 10 4540K 520K sleep 6:15 0.03 0.03 psmctd
1 ? 0 root 127 20 32K 0K sleep 0:30 0.02 0.02 swapper
0 ? 1 root 168 20 496K 204K sleep 0:00 0.02 0.02 init
1 ? 2 root 128 20 32K 32K sleep 0:03 0.02 0.02 vhand
0 ? 3 root 128 20 32K 32K sleep 2:26 0.02 0.02 statdaemon
0 ? 4 root 128 20 32K 32K sleep 0:08 0.02 0.02 unhashdaemon
0 ? 19 21 root 147 20 32K 32K sleep 0:00 0.02 0.02 lvmkd
1 ? 20 22 root 147 20 32K 32K sleep 0:00 0.02 0.02 lvmkd
1 ? 21 23 root 147 20 32K 32K sleep 0:00 0.02 0.02 lvmkd
0 ? 22 root 147 20 32K 32K sleep 0:00 0.02 0.02 lvmkd
0 ? 23 root 147 20 32K 32K sleep 0:00 0.02 0.02 lvmkd
0 ? 24 root 147 20 32K 32K sleep 0:00 0.02 0.02 lvmkd
1 ? 26 root 100 20 32K 32K sleep 0:00 0.02 0.02 smpsched
1 ? 27 root 100 20 32K 32K sleep 0:00 0.02 0.02 smpsched
0 ? 30 root 148 20 32K 32K sleep 0:02 0.02 0.02 lvmdevd
0 ? 65 root 148 20 32K 32K sleep 0:02 0.02 0.02 lvmdevd
0 ? 453 root 153 20 32K 32K sleep 0:00 0.02 0.02 dmprestored
1 ? 534 root 154 20 2692K 124K sleep 0:01 0.02 0.02 syslogd
0 ? 570 root 127 20 3988K 108K sleep 0:44 0.02 0.02 netfmt
0 ? 713 root 154 20 4080K 36K sleep 0:00 0.02 0.02 rpc.statd
0 ? 719 root 154 20 4140K 32K sleep 0:00 0.02 0.02 rpc.lockd
0 ? 730 root 154 20 3232K 152K sleep 0:01 0.02 0.02 automount
1 ? 750 root 154 20 3108K 144K sleep 0:15 0.02 0.02 inetd
0 ? 1055 root 154 20 6616K 684K sleep 1:12 0.02 0.02 mib2agt
0 ? 1104 root 154 20 11224K 2808K sleep 0:14 0.02 0.02 rpcd
1 ? 1131 root 120 20 2200K 200K sleep 0:35 0.02 0.02 xntpd
1 ? 1143 root 154 20 2840K 284K sleep 0:29 0.02 0.02 pwgrd
0 ? 1190 root 154 10 4132K 256K sleep 1:10 0.02 0.02 diagmond
0 ? 1213 root 154 20 10980K 1172K sleep 0:11 0.02 0.02 swagentd
0 pts/tf 1246 root 154 20 3864K 388K sleep 0:00 0.02 0.02 telnetd
1 pts/tf 1247 root 158 20 592K 184K sleep 0:00 0.02 0.02 sh
0 ? 1341 root 158 10 3060K 204K sleep 0:09 0.02 0.02 diaglogd
1 ? 1342 root 154 10 3800K 384K sleep 0:04 0.02 0.02 memlogd
0 ? 1350 root 154 20 2496K 40K sleep 0:00 0.02 0.02 registrar
0 ? 1429 root 154 20 2908K 92K sleep 0:00 0.02 0.02 nfsd
0 ? 1492 root 154 20 1908K 116K sleep 0:54 0.02 0.02 prngd
0 ? 1497 root 138 0 372K 104K sleep 0:00 0.02 0.02 krsd
Ganesan R
Honored Contributor

Re: Need to clean the system

Hi,

If swapper and vhand process are active, swapping is happening due to memory bottleneck. Now you need to find which process consumes more memory.

You can use glance or kmeminfo tool(if you have) to find the processes which is using high memory. Then you can decide whether to kill or restart the process.
Best wishes,

Ganesh.
HPlowSkill
Occasional Advisor

Re: Need to clean the system

According to the results of top command, vxsvc, samd, snpdm, swagentd, cimserver, rpcd are the costliest processes...
avizen9
Esteemed Contributor

Re: Need to clean the system

this server is use for what purpose?
when the server has last rebooted? can type uptime command to check it.

if server has not rebooted since many months can try to reboot it with
shutdown -ry now

HPlowSkill
Occasional Advisor

Re: Need to clean the system

The purpose of this server is to build our application. (compile...)

Exceptionally, we need to run an application today, a very gourmand application ( using at least 600M ).

------------

The uptime command says that the server is up for 11 days. But i can't restart it now, even if i want too !
smatador
Honored Contributor

Re: Need to clean the system

Hi,
stop the diagnostic
/sbin/init.d/diagnostic stop
What is the output of swapinfo -tam
HPlowSkill
Occasional Advisor

Re: Need to clean the system

# swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4096 29 4067 1% 0 - 1 /dev/vg00/lvol2
dev 4096 0 4096 0% 0 - 2 /dev/vg00/lvol9
reserve - 632 -632
memory 1511 1158 353 77%
total 9703 1819 7884 19% - 0 -
HPlowSkill
Occasional Advisor

Re: Need to clean the system

Does "memory" mean "Physical memory" in the last line of the swapinfo result?

Does it mean that the processes are now using 1158 Mb on 1511 Mb of physical Memory ( RAM ) ?

I'm not silly, but as I'm new on those system I prefer to be precise.
HPlowSkill
Occasional Advisor

Re: Need to clean the system

If you allow me one more question: why the memory informations returned by the top command are not consistent with those returned by swapinfo -tam

top:

Memory: 611352K (601288K) real, 732368K (693360K) virtual, 56296K free

swapinfo -tam:

memory 1511 Mb 1131 Mb 380 Mb 75% PCT
V. Nyga
Honored Contributor

Re: Need to clean the system

Hi,

which HP-UX do you run?
What's your hardware?

>Does "memory" mean "Physical memory" ...

Check 'man swapinfo' for this:
memory Memory paging area (also known as pseudo-swap). This is the amount of system memory that can be used to hold pages in the event that all of the above paging areas are used up. See "Paging Allocation" below. This line appears only if memory paging is enabled.

This indicates how much RAM you use, but it's not the RAM usage.

Volkmar
*** Say 'Thanks' with Kudos ***
V. Nyga
Honored Contributor

Re: Need to clean the system

Hi again,

for an exact decision, I believe you need 'glance':
https://h10078.www1.hp.com/cda/hpms/display/main/hpms_content.jsp?zn=bto&cp=1-11-15-28^9637_4000_100__

I never had the real need to use it (there's a 30-days-trail offer too).

I've some scripts to get some hints about my systems (this is for 11.11):
'UNIX95= ps -e -o vsz=Kbytes -o ruser -o pid,args=Command-Line|sort -rnk1|more'

Also attached a script to test physical memory and hint about the usage.

Maybe you have to decide:
Do you need sendmail, automount?
Also, as far as I remember, mib2agt had a memory leak some years ago, so I disabled it at some ws with less memory.

HTH
Volkmar
*** Say 'Thanks' with Kudos ***
Dennis Handly
Acclaimed Contributor

Re: Need to clean the system

>I really need to clean an HP-UX system, because we do not have enough memory.

Unless there is a problem with mib2agt as Volkmar mentioned, you are going to have to add more RAM or device swap.

Your current ps(1) output doesn't even show any use other than root and one ljb ksh.

Are you getting out of memory errors? Have you increased maxdsiz?
Albert Smith_1
Regular Advisor

Re: Need to clean the system

Sounds like your new to hp-ux.

Download a 60 day trial of glance and install it.

Start it and tweak your options to show your highest memory users. From there you can figure out which to terminate.

top - is a memory hog if left running.
if you don't need CDE shut it down
if you aren't using NFS I would stop that

The rest seem like necessary system process's.


Start with that first. I think that would provide you with some valuable insight.

Also check the system managment books at docs.hp.com
HPlowSkill
Occasional Advisor

Re: Need to clean the system

First of all, thank you for all the answers.
Then, you're right, I'm new on HP-UX, like I'm new on Unix in a more general way...

I'll try to apply your many advices.

I will let this thread opened a couple of days, and close it later if not necessary anymore.