AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
 View Only

Unable to consistently find process when using ps command

  • 1.  Unable to consistently find process when using ps command

    Posted Wed July 25, 2007 08:52 AM

    Originally posted by: SystemAdmin


    We have a simple shell script on client systems where we check for the existence of a Progress background process in the process table, and make a decision based on its existence or non-existence. We have found recently on one client where the results of our test are not consistent. For example:

    Check for the process and we see it:

    /home/testuser> ps glww |grep -v grep|grep "mi\/ba"|grep testdb
    240001 A 0 63762 1 1 64 22 f881f 10648 9888 - 5:17 /ecs/p
    db/rt/dlc/bin/_progres -b /ecs/pdb/db/testdb -p mi/backgnd.p -D 200 -B 100 -Bt
    1024 -ld ecs -yy 1960 -k /ecs/pdb/rt/dlc/forget -v6colon -t -T /ecs/pdb/temp -i
    np 15000 -s 5000 -k /ecs/pdb/db/forget

    Two seconds later, check for it again and we don't see it:

    Causeway:/home/testuser> ps glww |grep -v grep|grep "mi\/ba"|grep testdb
    Two seconds later, check for it yet again and we see it again:

    /home/testuser> ps glww |grep -v grep|grep "mi\/ba"|grep testdb
    240001 A 0 63762 1 3 65 22 f881f 10648 9888 - 5:17 /ecs/p
    db/rt/dlc/bin/_progres -b /ecs/pdb/db/testdb -p mi/backgnd.p -D 200 -B 100 -Bt
    1024 -ld ecs -yy 1960 -k /ecs/pdb/rt/dlc/forget -v6colon -t -T /ecs/pdb/temp -i
    np 15000 -s 5000 -k /ecs/pdb/db/forget
    This is on AIX 5100-04. The problem seems to have cropped up recently and we are not sure what has triggered it. We have used this same script on client systems for years, with AIX 4.3.x, 5, 5.1, 5.2, 5.3 etc... and have never had this problem crop up. Would this be considered normal and we have just been getting lucky ? From poring over the ps man page, it sounds as if processes that are paged out might not be shown by ps ?

    Thanks,
    Hounster
    #AIX-Forum