- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: file access info
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2005 08:20 PM
06-08-2005 08:20 PM
file access info
Just curious to know, is there anyway I can know when a executable file has been used? and if it was called by another program can I know which program was doing the call?
If not can I write a program to keep any of this future information in a log file, how can this be done?
Thank u
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2005 08:30 PM
06-08-2005 08:30 PM
Re: file access info
ls -lu
We can find the execution of specific file with history file or system auditing.
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2005 09:24 PM
06-08-2005 09:24 PM
Re: file access info
Thank you for the info. Can you elaborate on the latter suggestion? does HPUX has a history or audit application i can utilise in this case. Or should I write a script to do this?
Best regards
Henry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2005 09:32 PM
06-08-2005 09:32 PM
Re: file access info
You can enable the auditory in the server . However I prefer to create a centralized store for all the histories of every user .
I have introduced in my /etc/profiles
USER1=`id -nu`
USER2=`who am i | awk '{print $1}'`
tty=`who am i | awk '{ print $2 }'`
FROM=`who -a | grep -i $tty | awk '{print $NF }'`
SCREEN=`who -u -m | awk '{ print $NF }'| sed 's/:/ /g' | awk '{ print $1 }'`
export DISPLAY=$SCREEN:0.
TTYTEMP=`tty`
TTY=`basename $TTYTEMP`
FECHA=`date +%d%b%Y`
HORA=`date +%H%M%S`
export HISTFILE=/.history/${USER1}-${USER2}.${TTY}.${FECHA}.${HORA}
export PS1=`hostname`':$PWD> '
EDITOR=vi
export $EDITOR
It creates a history for each user in a "hidden" folder
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2005 09:38 PM
06-08-2005 09:38 PM
Re: file access info
For history we export these two lines in /etc/profile for all users or for a indivisual user in his .profile.
export HISTFILE="/path_to_file/$LOGNAME"
export HISTSIZE=1000
Here /path_to_file directory should be writable by user for which you are exporting history.
This will create a file with user name in this directory.
HTH,
Devender
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2005 09:39 PM
06-08-2005 09:39 PM
Re: file access info
set -o $EDITOR
HISTFILE=$HOME/.sh_history_$LOGNAME_$(date +'%d-%m-%y_%X')
HISTSIZE=1000
so that it will create history information in users home page with .sh_history_(login name_ date_time)
If you want to audit the user command execution then you have turn your system into trusted one.
You have to use /usr/lbin/tsconvert utility to do it or using sam also u can do it.
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2005 09:42 PM
06-08-2005 09:42 PM
Re: file access info
Thank you for the info.. actually my problem is that a program (say X) running on my workstation seems to behave strangely, as it is an object files, i can't see their content. But I seriouly will like to know which program running on the background is executing X and when the execution is being carried out? Can this be done?
Best regards
Henry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2005 11:08 PM
06-08-2005 11:08 PM
Re: file access info
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2005 05:02 PM
06-09-2005 05:02 PM
Re: file access info
try to find the pid of the original x session that starts then you can do a grep for the pid that is running the x program.
ps -ef| grep pid
This will give you quite a few.
if you want a specific filesystem details,
you can do a
fuser -c /var
and that will give you all the pids accessing any files on say /var
Try to match the pid of your original x program or it's children to the list you just got from fuser.
Devesh