I need to migrate the scripts to Linux but I would like to know which ones are currently being executed rather than migrating all 500 of them.
Is there a way in Solaris 5.9 to do this? I have googled and I believe there is a way in the later versions but not sure about this ancient version.
Solaris 9 is old (released in 2002, supported until 2014), but is not ancient. The "ls" command hasn't substantially changed in the last 3 or 4 four decades so identifying the scripts that have been accessed is a first and easy step. Same for accounting which was supported by Solaris 9.
Anyway, a simple method to identify if existing scripts are executed is to wrap them with a logger script.
For example, assuming you have several shell scripts in the /opt/local/bin directory
You create a directory /opt/local/bin_org and move the scripts you want to monitor in it, then you create a wrapper script and have the system using it when the original scripts are expected:
Execution logs will be in /var/tmp/scriptLogs
These 2 Users Gave Thanks to jlliagre For This Post:
Hi There,
I have 3 scripts that have to be run one after the other. All 3 scripts are dependent of the other. Now, If I am about to run the second script, assuming that the first script has already been run, can I get the status of the first script.
The problem is that, My second script has... (11 Replies)
In the Java programme, I am calling function, "Runtime.getRuntime().exec( cmdarray ); " with the array of arguments in which first argument is the binary(C-executable) file and argv1,argv2 and so on. This will be executed on Sun OS system.. I can execute using "sh -c cmdarray" on the shell... (0 Replies)
Hello all,
I have a script callled 'ABCstartup' setup under /etc/rc.d/init.d
Softlink 'S91ABCstartup' pointing to above script has been created under /etc/rc.d/rc3.d
The script is not being executed when the server restarts.
The script runs successfully via manual execution:... (5 Replies)
Hi,
we have server, that is auditing actions executed, and then sends them to the syslog server.
But there is arguments to issued to the commands in the audit trail, but there is no such arguments in the syslog output on the syslog server!
Example - I executed:
# ls -la
audit... (1 Reply)
I have compiled my application on Solaris 10 with following description
SunOS ldg1 5.10 Generic_138888-03 sun4v sparc SUNW,Sun-Blade-T6320
The compiler is Sun C++ 5.9 SunOS_sparc Patch 124863-01 2007/07/25
But when installing the application on Solaris 9
SunOS odcarch02 5.9... (2 Replies)
Hi,
I am looking for a script wherein i will be able to execute below procedures one by one in line and next procedures starts only when the previous one completes and also after execution of each procedure i will be getting a automted mail as "PL/SQL PROCEDURE SUCCESSFULLY EXCETUTED".
... (1 Reply)
Hi every one, i am new to shell script. my people given a task to write a shell script that should execute number of shell scripts in that. in that, if any shell script is failed to execute, we have to run the main script again, but the script should start execute from the failed script only..
it... (1 Reply)
Hi every one, i am new to shell script. my people given a task to write a shell script that should execute number of shell scripts in that. in that, if any shell script is failed to execute, we have to run the main script again, but the script should start execute from the failed script only..
it... (6 Replies)
Hi All, how to list all the commands executed by users on a linux server.... I dont have access to others .bash_history. and i am not root user.. Please help.. Thanks in advance.. (6 Replies)