CPU Performance Problems on VMWARE

hi

We have migrated SCO 5.0.6 into ESX4, but the VM eats 100% of the virtual CPU.

Here is top print from the SCO VM:

last pid: 16773;  load averages:  1.68,  1.25,  0.98                   02:08:41
79 processes:  75 sleeping, 2 running, 1 zombie, 1 onproc
CPU states:  0.0% idle, 17.0% user, 83.0% system,  0.0% wait,  0.0% sxbrk
Memory: 512M phys, 447M max, 416M free, 441M locked, K unlocked, 2000M swap

  PID USERNAME PRI NICE   SIZE   RES  STATE   TIME  COMMAND
  341 root      26    0   868K   868K onpr    0:00  top
16773 root      26    0   940K   940K run     0:00  lpd
  400 root     -10    0   924K   924K run     2:04  lpd
  392 root     102    0  1124K  1124K sleep   0:00  ntpd
 7536 nouser    51    0    17M 17516K sleep   0:00  httpd
 7535 nouser    51    0    17M 17516K sleep   0:00  httpd
19016 nouser    51    0  8468K  8468K sleep   0:00  httpd
  390 root      51    0  2812K  2812K sleep   0:00  sshd

Howto tune SCO 5.0.6 for VMware?

not sure about the SCO specifics running on VMWare but what is taking 83% system time? I cannot tell from the top output but you have two lpd processes in the run state. Is your printing daemons running properly? Can you post ps -ef?

Which process is hitting so much CPU usage?
Here is ps -ef output:

# ps -ef
     UID   PID  PPID  C    STIME     TTY        TIME CMD
    root     0     0  0 02:46:38       ?    00:00:00 sched
    root     1     0  0 02:46:38       ?    00:00:00 /etc/init -a
    root     2     0  0 02:46:38       ?    00:00:00 vhand
    root     3     0  0 02:46:38       ?    00:00:00 bdflush
    root     4     0  0 02:46:38       ?    00:00:00 kmdaemon
    root     5     1  0 02:46:38       ?    00:00:01 htepi_daemon /
    root     6     0  0 02:46:38       ?    00:00:00 strd
    root 10310   390  0        -       -    00:00:00 <defunct>
    root    53     1  0 02:48:06       ?    00:00:00 /etc/ifor_pmd
    root    54    53  0 02:48:06       ?    00:00:00 /etc/ifor_pmd
    root 15829     1  0 02:49:01   tty01    00:00:00 /etc/getty tty01 sc_m
    root    41     1  0 02:48:05       ?    00:00:00 htepi_daemon /stand
    root 15830     1  0 02:49:01   tty02    00:00:00 /etc/getty tty02 sc_m
    root    60    54  0 02:48:06       ?    00:00:00 /etc/sco_cpd
    root    61    54  0 02:48:06       ?    00:00:00 /etc/ifor_sld
    root    80     1  0 02:48:06       ?    00:00:00 strerr
    root 15831     1  0 02:49:01   tty03    00:00:00 /etc/getty tty03 sc_m
    root 15832     1  0 02:49:01   tty04    00:00:00 /etc/getty tty04 sc_m
    root   282   278  0 02:48:49       ?    00:00:00 /etc/pwr/lib/listen system/                                              start-2 pwrd/startup /dev/fd/4
    root   278     1  0 02:48:49       ?    00:00:00 /etc/pwr/bin/pwrd
    root   334     1  0 02:48:49       ?    00:00:00 rusersd
    root   304     1  0 02:48:49       ?    00:00:00 /etc/cron
    root   194     1  0 02:48:48       ?    00:00:00 htepi_daemon /usr2
    root   289     1  0 02:48:49       ?    00:00:00 /opt/K/SCO/lli/5.0.6a/bin/d                                              lpid /var/opt/K/SCO/lli/5.0.6a/dlpidPIPE
    root   327     1  0 02:48:49       ?    00:00:00 portmap
    root   314     1  0 02:48:49       ?    00:00:00 /usr/lib/lpsched
    root  6289     1  0 02:48:55       ?    00:00:00 /usr/lib/scosh/calserver
    root   333     1  0 02:48:49       ?    00:00:00 rwalld
  nouser  5925  4410  0 02:48:55       ?    00:00:00 /usr/lib/apache/bin/httpd
    root 15728     1  0 02:49:01       ?    00:00:00 /usr/lib/apache/bin/httpd -                                              d /usr/lib/docview -f /usr/lib/docview/conf/httpd.co
    root   380     1  0 02:48:50       ?    00:00:00 /etc/sshd
    root   377     1  0 02:48:50       ?    00:00:00 /etc/snmpd
    root   351     1  0 02:48:49       ?    00:00:01 /etc/in.prngd /etc/egd-pool
    root  1459     1  0 02:48:52       ?    00:00:00 biod 4
    root   367     1  0 02:48:49       ?    00:00:00 /etc/inetd
    root   382     1  0 02:48:50       ?    00:00:05 ntpd -g
    root  4410     1  0 02:48:54       ?    00:00:00 /usr/lib/apache/bin/httpd
    root   390     1 95 02:48:50       ?    00:29:07 /usr/lbin/lpd -G
    root  1480  1471  0 02 begin_of_the_skype_highlighting**************1480 1471 0 02******end_of_the_skype_highlighting:48:52       ?    00:00:00 nfsd -u 4 -t 16
    root   533     1  0 02:48:51       ?    00:00:00 /usr/mmdf/bin/deliver -b
    root  1272     1  0 02:48:51       ?    00:00:00 /usr/lbin/archd -s 60
    root  1473     1  0 02:48:52       ?    00:00:00 statd
    root  1471     1  0 02:48:52       ?    00:00:00 nfsd -u 4 -t 16
  nouser  5926  4410  0 02:48:55       ?    00:00:00 /usr/lib/apache/bin/httpd
    root  1460     1  0 02:48:52       ?    00:00:00 biod 4
    root  1461     1  0 02:48:52       ?    00:00:00 biod 4
    root  1462     1  0 02:48:52       ?    00:00:00 biod 4
    root  1505     1  0 02:48:52       ?    00:00:00 lockd -u 4 -t 16
    root  1478     1  0 02:48:52       ?    00:00:00 mountd
    root  1479  1471  0 02:48:52       ?    00:00:00 nfsd -u 4 -t 16
    root  1481  1471  0 02:48:52       ?    00:00:00 nfsd -u 4 -t 16
    root  1482  1471  0 02:48:52       ?    00:00:00 nfsd -u 4 -t 16
    root  1508  1505  0 02:48:52       ?    00:00:00 lockd -u 4 -t 16
    root  1509  1508  0 02:48:52       ?    00:00:00 lockd -u 4 -t 16
    root  1510  1508  0 02:48:52       ?    00:00:00 lockd -u 4 -t 16
    root  1511  1508  0 02:48:52       ?    00:00:00 lockd -u 4 -t 16
    root  1512  1508  0 02:48:52       ?    00:00:00 lockd -u 4 -t 16
    root  6322  6289  0 02:48:55       ?    00:00:00 /usr/lib/scosh/calserver
  nouser  5927  4410  0 02:48:55       ?    00:00:00 /usr/lib/apache/bin/httpd
  nouser  5928  4410  0 02:48:55       ?    00:00:00 /usr/lib/apache/bin/httpd
  nouser  5929  4410  0 02:48:55       ?    00:00:00 /usr/lib/apache/bin/httpd
    root 14570     1  0 02:49:00       ?    00:00:00 /usr/lib/scosh/caldaemon
  nouser 15731 15728  0 02:49:01       ?    00:00:00 /usr/lib/apache/bin/httpd -                                              d /usr/lib/docview -f /usr/lib/docview/conf/httpd.co
    root  6154     1  0 02:48:55       ?    00:00:00 /var/scohttp/scohttpd -d /v                                              ar/scohttp
    root 15833     1  0 02:49:01   tty05    00:00:00 /etc/getty tty05 sc_m
    root 15834     1  0 02:49:01   tty06    00:00:00 /etc/getty tty06 sc_m
    root 15835     1  0 02:49:01   tty07    00:00:00 /etc/getty tty07 sc_m
    root 15836     1  0 02:49:01   tty08    00:00:00 /etc/getty tty08 sc_m
    root 15837     1  0 02:49:01   tty09    00:00:00 /etc/getty tty09 sc_m
    root 15838     1  0 02:49:01   tty10    00:00:00 /etc/getty tty10 sc_m
    root 15839     1  0 02:49:01   tty11    00:00:00 /etc/getty tty11 sc_m
    root 15840     1  0 02:49:01       ?    00:00:00 /bin/sh -c /usr/lib/u386mon                                              /u386mon.sh tty12
    root 15841     1  0 02:49:01       ?    00:00:00 /tcb/files/no_luid/sdd
    root  2333   380  1 09:39:14       ?    00:00:00 /etc/sshd -R
    root 15844 15840  0 02:49:01       ?    00:00:00 /bin/sh -c /usr/lib/u386mon                                              /u386mon.sh tty12
    root 28399     1  0 09:40:25   tty1A    00:00:00 /etc/getty_50 -t60 tty1A 96                                              00
    root 15906 15844  0 02:49:01       ?    00:00:00 su -c /usr/bin/u386mon
    root 15907 15906  0 02:49:01       ?    00:00:21 /usr/bin/u386mon
  nouser 17231 15728  0 02:49:02       ?    00:00:00 /usr/lib/apache/bin/httpd -                                              d /usr/lib/docview -f /usr/lib/docview/conf/httpd.co
  nouser 18877 15728  0 02:49:03       ?    00:00:00 /usr/lib/apache/bin/httpd -                                              d /usr/lib/docview -f /usr/lib/docview/conf/httpd.co
  nouser 18878 15728  0 02:49:03       ?    00:00:00 /usr/lib/apache/bin/httpd -                                              d /usr/lib/docview -f /usr/lib/docview/conf/httpd.co
    root 10311   390  0        -       -    00:00:00 <defunct>
    root 20905  2333  2 09:39:25   ttyp0    00:00:00 -sh
    root 10312 20905  1 09:41:09   ttyp0    00:00:00 ps -ef
 

BTW on the old physical system is the same problem > 85.4% system.

Try running this:

#!/bin/sh
ps -A -o "pid=" -o "pcpu=" |awk '$2 > 5 {print $1 " " $2}' | sort -r +1

It will list all processes using more than 5 percent cpu.

1 Like

There's one process that seems out of bounds (4th column is %CPU used):

    root   390     1 95 02:48:50       ?    00:29:07 /usr/lbin/lpd -G

Check the printing configuration and log files for any oddities.

1 Like

Thx, I'm getting this:

# ps -A -o "pid=" -o "pcpu=" |awk '$2 > 5 {print $1 " " $2}' | sort -r +1
390 7,62

Thx, but howto check lpd log files or find lpd problem on SCO 5.0.6?

... and something under that process has died.

The manual implies that errors are in syslog but there is no mention of a "-G" switch to lpd.
lpd(ADMN)

1 Like

Thx, but howto find out which process was died?

And here is /etc/init.d/lpd startup script:

# cat /etc/init.d/lpd

#!/bin/sh

#"@(#)Copyright (C) 1994 by DS";
#"@(#)  $RCSfile: init.d_lpd,v $        $Revision: 1.1 $ $Date: 1995/04/19 05:37:22 $";

#
# $Log: init.d_lpd,v $
#    Revision 1.1  1995/04/19  05:37:22  root
#    Environmentvariable LPD_SLEEP und LPD_RETRIES eingef�gt.
#
#    Revision 1.0  1995/02/23  13:36:24  root
#    Initial revision
#
#


#
# Control the line-printer daemon
#

PATH=/sbin:/usr/sbin:/usr/bin:/bin:/etc
export PATH
MSG1="Advanced Line Printer System started"
MSG2="Advanced Line Printer System stopped"
LOCK=/usr/adm/lpd.lock

LP_OPTS="-h"
export LP_OPTS

#LPD_SLEEP=2
#LPD_RETRIES=3
#export LPD_SLEEP LPD_RETRIES

case "$1" in
'start')
                set `who -r`
                if [ $9 = "S" ]; then
                        rm -f /dev/printer
                        if [ -x /usr/lbin/lpd ]
                        then
                                /usr/lbin/lpd -G
                                echo $MSG1
                        fi
                fi
                ;;
'stop')
                pid=`cat $LOCK`
                /bin/kill $pid 2>/dev/null
                echo $MSG2
                ;;
*)
        echo "usage: $0 {start|stop}"
        ;;
esac

It's quite interesting, if I stop or start lpd, I don't get any error messages:

# /etc/init.d/lpd stop
Advanced Line Printer System stopped
# /etc/init.d/lpd start
Advanced Line Printer System started

Even the same problem happens, if I start using /usr/lbin/lpd

# /usr/lbin/lpd
# ps -ef | grep lp
    root   289     1  0 18:16:38       ?    00:00:00 /opt/K/SCO/lli/5.0.6a/bin/dlpid /var/opt/K/SCO/lli/5.0.6a/dlpidPIPE
    root   314     1  0 18:16:38       ?    00:00:00 /usr/lib/lpsched
    root 22988     1 95 18:44:59       ?    00:00:21 /usr/lbin/lpd