Visit Our UNIX and Linux User Community


When were all scripts on the Solaris server last executed?


 
Thread Tools Search this Thread
Operating Systems Solaris When were all scripts on the Solaris server last executed?
# 1  
Old 11-20-2018
When were all scripts on the Solaris server last executed?

Hi All,


I am new to this forum and I am hoping someone will be able to help meSmilie


I have inherited a very old Solaris server that has a number of scripts around 500 in total.


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.


Any help would be greatly appreciatedSmilie
# 2  
Old 11-20-2018
It's always a good idea to search the forums before asking a question (which is also the forum rules).

See this prior thread and it should give you the clues you need:

last run time of any script
# 3  
Old 11-20-2018
Hi Neo,


I read that post but I do not believe I can use accounting -see in the version of Solaris I have can I.


I tried the two ls commands but they don't give me what I need.


I need a list of all scripts executed on the Solaris box over the previous month or to turn something on that can monitor for the next month to see what is being run currently so I can work out what scripts to move to the Linux box.



Cheers
# 4  
Old 11-20-2018
Sorry, I don't run Solaris 5.9 so I have no machine to help!

We do have the man pages available for 5.10 maybe you can find a reference there:

https://www.unix.com/man-page-sunos-repository.php
# 5  
Old 11-20-2018
Thanks Neo,


I'll take a look and see if I can find anythingSmilie


Cheers
# 6  
Old 11-20-2018
If you look at this man page:

https://www.unix.com/man-page/sunos/1/ls/

You can see the ls option:

Code:
 -u	Uses time of last access instead of last modification for sorting (with the -t	option)  or  printing (with the -l option).

Seem like that kind of command, ls -u combined with find or a similar method will be helpful and meet your objective.
# 7  
Old 11-20-2018
You're asking how to know which scripts run during the next month. So are users still using this system? If so, can't you ask them what commands they are running? If cron is automatically running stuff, why not pull up the crontabs and look at them?

Files are normally in:

Code:
/usr/spool/cron/crontabs

one file per username that has jobs scheduled. Although you shouldn't edit these files directly, they are perfectly readable with 'cat' for example.

Sorry if I'm on the wrong track here but I'm not clearly understanding your difficulty.

Please elaborate on the problem.

Last edited by hicksd8; 11-20-2018 at 07:21 AM..

Previous Thread | Next Thread
Test Your Knowledge in Computers #512
Difficulty: Medium
PHP requires that all variables begin with a dollar sign, for example $flag.
True or False?

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

List commands executed on a server

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)
Discussion started by: nanz143
6 Replies

2. Shell Programming and Scripting

Multiple shell scripts executed in one script

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)
Discussion started by: Madhu Siddula
6 Replies

3. Shell Programming and Scripting

Multiple shell scripts executed in one script

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)
Discussion started by: Madhu Siddula
1 Replies

4. UNIX for Advanced & Expert Users

Procedure to be executed from shell scripts

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)
Discussion started by: sv0081493
1 Replies

5. Solaris

Scripts in solaris server

hi, i want to know whether we can use both perl and unix shell in a single script in Solaris server (4 Replies)
Discussion started by: chn10db001
4 Replies

6. Solaris

application compiled on solaris 10 throwing error when executed on solaris 9

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)
Discussion started by: ash_bit2k2
2 Replies

7. Solaris

Solaris audit to syslog - where is arguments to the commands executed?

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)
Discussion started by: masloff
1 Replies

8. Linux

Script under rc3.d not being executed on server bootup

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)
Discussion started by: hemangjani
5 Replies

9. Programming

Binary not getting executed from Java on Solaris environment

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)
Discussion started by: shafi2all
0 Replies

10. Shell Programming and Scripting

Staus of Executed Scripts

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)
Discussion started by: pathanjalireddy
11 Replies

Featured Tech Videos