Operating System - HP-UX
1825782 Members
2141 Online
109687 Solutions
New Discussion

Re: Processes X Archive...

 
Abel Berger
Regular Advisor

Processes X Archive...

Hello all !

I have an archive where an application that I manage is generating logs. But he is difficult to identify the cause. Somebody knows if
some command in the HP-UX (10.20) exists
that says which processes to me is having access determined archive.

Thanks a lot !

Regards...

Abel Berger
Unix Specialist
S?o Paulo - Brazil


4 REPLIES 4
Juan González
Trusted Contributor

Re: Processes X Archive...

Hi Abel,
I think you can find useful the lsof utiliy.
#lsof X
gives you the PID of the process that have X archive open.
You can find lsof in http://hpux.cs.utah.edu/

Unha aperta
Juan Gonzalez
Abel Berger
Regular Advisor

Re: Processes X Archive...

I try use the fuser command, but the aplication
is big and many process log in a log file.

I think that I will forget this !

Thanks Juan.
A. Clay Stephenson
Acclaimed Contributor

Re: Processes X Archive...

Hi Abel,

I think I understand you question and there are two tools which will do the trick.

1) fuser - man fuser to see how it works
and a much better option though you will need
to downloand a binary version from one of the HP-UX Porting Centers - it's called 'lsof' List Open Files

you simply lsof /usr
and it will list every process accessing /usr.

Hope I understood what you are asking, Clay
If it ain't broke, I can fix that.
Abel Berger
Regular Advisor

Re: Processes X Archive...


Hi Clay,

If I use the lsof software how is the output ? PID ? PPID ?
Because de fuser output is following :

# fuser /opt/sgt/logs/uproc.log

4826 26558 16334 6877 7020 5541 13790 5556 3287 897
26565 22628 916 6172 5529 3105 6871 24328 11283 26290
766 5511 5582 5555 8856 693 6167 5626 5522 3050
12830 5593 14219 1218 7092 5545 29260 6862 26606 14286
5482 3303 6170 6273 6173 5973 6880 890 6174 6914
13821 5549 5484 5976 14607 14731 10017 7085 6168 14707
909 24597 25580 8583 27305 15538 15086 5546 4843 3291
5870 6974 9516 13053 5640 3296 7113 7040 14800 906
13663 7055 22929 5548 15013 20386 14633 16353 6911 14846
3233 6915 13789 6846 2574 11898 13742 6961 910 14896 29271

Clay,

How you can see the processes are many and
Is much difficult find what process are generating log in the uproc.log file.

I?m correct or not ?

Thanks a lot !

Abel Berger