Operating System - HP-UX
1753767 Members
6138 Online
108799 Solutions
New Discussion юеВ

Re: How to check which commands run in the system except history...

 

How to check which commands run in the system except history...

how to check which commands run previously in hpux 11i version 2?
9 REPLIES 9
Ivan Krastev
Honored Contributor

Re: How to check which commands run in the system except history...

Use integrated audit software or install Auditing System Extensions for free - https://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=AuditExt

regards,
ivan

Re: How to check which commands run in the system except history...

Hi Ivan, First thanks for reply. What if i want to check without applying auditing. Is there any other way?
sarfaraj ahmad
Trusted Contributor

Re: How to check which commands run in the system except history...

Hi Syed,

please check .sh_history in the home directory.

you can do this through your profile setting.

you can set HISTSIZE and HISTFILE parameter in .profile file to record the command history.

please go through the below thread which may help you.
http://h30499.www3.hp.com/t5/System-Administration/setting-sh-history/m-p/4021711#M300068

Re: How to check which commands run in the system except history...

Dear Ivan and Sarfaraj, Thanks a lot. i think that there is no other way except history procedure. Please let me know if you know some other way. i dont want to go for auditing solution as well.

Regards,
Ali.
Ismail Azad
Esteemed Contributor

Re: How to check which commands run in the system except history...

Hi,

Seems like you don't like the POSIX shell . Change your shell to K. History is there by default in the shell without addition of any lines in /etc/profile or .profile. It's not a smart thing but is definitely a "way". :)

Regards
Ismail Azad
Read, read and read... Then read again until you read "between the lines".....

Re: How to check which commands run in the system except history...

HI azad,

no its not like that. Actually i want to know the exact location file from where i can grep all previous commands. As far as i know there are commands on shell but not any file.

Regards,
Ali.

Re: How to check which commands run in the system except history...

Hi All,
So it means i need to through the output of history commands to some file at some location to maintain the record without implementing auditing.

Regards,
Ali.
Jose Mosquera
Honored Contributor

Re: How to check which commands run in the system except history...

Hi,

The .sh_history file is a elementary way to audit command execution at the shell. In the case of any advanced user executes commands from an intermediate shell environment (i.e: main scripts, vi editor, etc) you lose the trace capability from .sh_history file.

By audit activating on Trusted systems may be a strongest way to keep a reliable trace of commands executions by users. Of course, this activation will needs management and maintenance to keep your system in sanity levels. Is *critical* that you review the Trusted mode activation considerations. Also keep on mind that trusted systems have been deprecated in HP-UX 11i v3 (11.31).

Rgds.

Re: How to check which commands run in the system except history...

Dear Jose,

Thanks for good info. I have already clear that i want to make it without system auditing. Any way.Thanks All.

Regards,
Ali.