The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Problem in updating .profile file in HP-UX B.11.00 machine abhishek0071 UNIX for Advanced & Expert Users 3 02-07-2008 12:06 PM
Possible to track FTP user last login? Last and Finger don't track them. LordJezo UNIX for Dummies Questions & Answers 1 11-08-2007 10:21 AM
Machine Problem Dastard SUN Solaris 2 03-07-2007 09:59 AM
leave a process running in a remote machine pbasil UNIX for Dummies Questions & Answers 3 03-15-2006 07:04 AM
Track Sftp process borncrazy Shell Programming and Scripting 9 12-12-2005 11:50 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 01-30-2008
Registered User
 

Join Date: Jan 2008
Posts: 14
Problem to track process IDs in HP-UX machine

Hello All,

I need to track the exact process ID related to a particular application running on HP-UX machine. i.e. the exact functionality of fuser unix command.
fuser application.log // It gives the exact process ID for application.log
Since there is no provision for 'fuser' in HP-UX machine, please help me how I can achieve the same functionality.

Thanks & Regards
Abhishek
Reply With Quote
Forum Sponsor
  #2  
Old 01-30-2008
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,667
Quote:
Originally Posted by abhishek0071 View Post
Since there is no provision for 'fuser' in HP-UX machine, please help me how I can achieve the same functionality.
Hmmm...maybe this command?
Reply With Quote
  #3  
Old 01-31-2008
Registered User
 

Join Date: Jan 2008
Posts: 14
Thnx Perderabo for your quick response.
But the problem is I don't have permission for fuser command. That is why I am in problem. That is why while using /usr/sbin/fuser it is giving me error "Permission denied".
So what I want to do is to write a script using some command like ps -ef etc. and get the exact output as fuser produce.
For example : fuser application.log OUTPUT- 21235 (i.e. PID)
Similarly I want to perform this using ps command or set of commands. Is there any way to do it ?

Waiting for your response.......

Thanks & Regards
Abhishek
Reply With Quote
  #4  
Old 01-31-2008
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,667
No, ps does not have enough info. If lsof is installed on your system it may work for you. But lsof is not part of HP-UX and you cannot install it unless you are root.
Reply With Quote
  #5  
Old 01-31-2008
Registered User
 

Join Date: Jan 2008
Posts: 14
I know ps command is not enough as I have tried a lot. Also you can consider me as a user.
I am not a root and hence for fuser I don't have permission and searching for the alternatives.
Can you please suggest me any as this is really important !!

Thnx for your assistance
Reply With Quote
  #6  
Old 02-01-2008
vbe vbe is online now
Moderator
 

Join Date: Sep 2005
Location: Switzerland
Posts: 775
I remember seing some issues due to a security patch...removing permissions on some commands...
So my point of vue is if you were not allowed to use fuser (I found a box like that...) the message would be: cannot execute:

ra:/opt/java/bin $ fuser -cu /opt
/usr/bin/ksh: fuser: cannot execute
ra:/opt/java/bin $ ll /usr/sbin/fuser
-r-xr--r-- 1 bin bin 24576 Aug 3 2000 /usr/sbin/fuser
ra:/opt/java/bin $ exit
ra:/opt/java/bin $ cd
ra:/home/vbe $ cp /usr/sbin/fuser .
ra:/home/vbe $ ll fuser
-r-xr--r-- 1 vbe bin 24576 Feb 1 15:32 fuser
ra:/home/vbe $ fuser -cu /opt
/opt: 3738mto(root) 3116mt(root) 3729mto(root) 3225mto(lp) 29018mcto(ratel) 3259mto(root) 3263mto(root) 3733mto(root) 3588mt(root) 3301mto(root) 3354mt(root) 3687co(nursery) 527mcto(omv) 3392mto(root) 3724mto(root) 3712mto(root) 3741mto(root) 4289mcto(omv) 3755mto(root) 4281mcto(omv) 27936c(ratel) 5320mto(root) 16447c(ratel) 7269mto(root) 4808mct(root) 5332mto(root) 5333mto(root) 1435mt(root) 29005c(ratel) 28971c(vbe) 14287c(vbe) 26547c(ratel) 28972c(vbe) 21845c(ratel) 14305mt(vbe) 1947co(nursery)

ra:/home/vbe $

So I wonder if it isnt more on the filesystem you have no rights...
Reply With Quote
  #7  
Old 02-02-2008
Registered User
 

Join Date: Jan 2008
Posts: 14
Thanks for your response vbe, but still the problem exists. On copying the executable file /usr/sbin/fuser to my home directory and then giving all permissions, it says
bash: fuser: command not found.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 09:32 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0