Sponsored Content
Top Forums Shell Programming and Scripting Script to log into unix box and do a set of activities Post 302242474 by cybersandex on Thursday 2nd of October 2008 02:45:14 AM
Old 10-02-2008
Java Script to log into unix box and do a set of activities

Hi all,
I want to automate a set of activities i am doing daily.the activities in the order are:
1.loging in to the unix box.
2.sudo su - tsiap, give pwd
3. cd appsrv
4. cd log
5. run the below cmd one by one, if you find any query which has run for more than 5 secs, open the particular SQL log(sqllog_clrdg5q1 for queue1 & sqllog_clrdg5q2 for queue2) using less command(less <respective log file> and search with the process id to get the SQL.

command or query:cat sqllog_clrdg5q1 | grep SQL_ROUNDTRIP_TIME | cut -d' ' -f4,4,3,3,7,7,8,8 | sort -k 2,2n | tail -5

example ouput:#7835 27.892056 01/18/08 00:01:32

I open that particular process #7835 and copy the query in to word document.

I have to dod this for 4 servers ...so it is tiring and boring

Any idea's and pointers on how this can be implemented are welcome

Thanks in advance,
Cybersandex.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

VPN client (windows Box),and Server (Unix Box)

If I want to access unix box via VPN tunnel,from windows box. What sould I configure on the windows client PC, and what should I enable on the Unix Server box ? I am using Solaris V10 intel platform, and I am using windows XP, and 2003 for client (0 Replies)
Discussion started by: zillah
0 Replies

2. UNIX for Advanced & Expert Users

How to FTP a file generated at UNIX Box to NT Box

Hi all, I am generating a file on the Unix machine , now i want to FTP the same file to the NT machine. how can i do that and the application currently upon which i am working is a JAVA based application. I need your help. regards Ruchir (2 Replies)
Discussion started by: Ruchir
2 Replies

3. Shell Programming and Scripting

calling a unix script in one box from another box

i have a unix script which is available in a box say box1 i want this script to be run in box box2 and put the output file in box2 what is the procedure to execute this script in box2 i will call the script in box1 using cybermation (1 Reply)
Discussion started by: trichyselva
1 Replies

4. UNIX for Dummies Questions & Answers

Running UNIX commands remotely in Windows box from Unix box – avoid entering password

I am able to run the UNIX commands in a Windows box from a UNIX box through "SSH" functionality. But whenever the SSH connection is established between UNIX and Windows, password for windows box is being asked. Is there a way to avoid asking password whenever the SSH connection is made? Can I... (1 Reply)
Discussion started by: D.kalpana
1 Replies

5. Shell Programming and Scripting

Moving files from Unix box to a windows box

Hi All, I need a little help .I want to transfer a file from unix box to a windows box,but the problem i'm facing is that in windows box FTP is not enabled and currently it is nearly impssible to change setting on windows box,i can not use the ftp method ,in my shell script to transfer the file.... (2 Replies)
Discussion started by: Preet
2 Replies

6. UNIX for Dummies Questions & Answers

I need an scp command from a unix box to a windows box.

scp file="myfile.txt" todir="user@somehost:(M:drive:/somepath/)"/ Not sure I need it to go to a specific drive on the windows box (1 Reply)
Discussion started by: xgringo
1 Replies

7. Shell Programming and Scripting

how to compare all files in one unix box has been to copied to another unix box

Hi our unix admin has copied all files from one unix box to new unix box. We just need to confirm that all the file systems are copied properly. How to validate. (9 Replies)
Discussion started by: sravanreddym
9 Replies

8. Shell Programming and Scripting

ftp file starting with particular name on Windows box to Unix box using shell script

Hello all ! I'm trying to write a shell script (bash) to ftp a file starting with particular name like "Latest_" that is present on a Windows box to UNIX server. Basically I want to set this script in the cron so that daily the new build that is posted on the Windows box can be downloaded to the... (2 Replies)
Discussion started by: vijayb4u83
2 Replies

9. Shell Programming and Scripting

shell script for monitoring users activities

hi I need a shell script which runs perpetually in background and monitors different aspects of different users on different files and their usages for example say there r 3 users so i want when they log in i.e. their log in time and their file access, modify and change log of each file of a... (3 Replies)
Discussion started by: rrd1986
3 Replies

10. Shell Programming and Scripting

Clean up UNIX mail box using script

Hi, I would like to clean up by unix mail mail box thru some script command.. I do know how to delete from mail box ... e.g. $ mail ? d* ? quit But I need to clean up thru some command which I can use in my script before sending any email.. Thanks in advance! (1 Reply)
Discussion started by: pareshkp
1 Replies
uulog(1)						      General Commands Manual							  uulog(1)

NAME
uulog - Displays UUCP log files SYNOPSIS
/usr/lib/uucp/uulog -f system [-number] uulog uulog systems [-number] uulog -s system [-number] uulog -x [systems] The uulog command displays the contents of a log file of uucico or uuxqt activities. STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: uulog: XCU5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. OPTIONS
[Tru64 UNIX] Performs a tail -f on the file transfer log for the specified system, displaying the end of the log file. Use the Interrupt key sequence to leave the file and return to the prompt. Prints information about copy requests involving the specific system. If no sys- tem is specified, information is displayed for all systems. Note: System name can contain only ASCII characters. [Tru64 UNIX] Displays the uuxqt log file for the specified systems. If no systems are specified, information is displayed for all systems. [Tru64 UNIX] Displays the last lines of the log file. The number of lines is determined by the number argument. (To display the lines, the uulog command issues a tail for the specified number of lines.) DESCRIPTION
Individual log files are created for each remote system with which the local system communicates using the uucp, uusend, uuto, or uux com- mands. Use the uulog command to display a summary of uucp, uusend, uuto, and uux command requests by a system or systems. All of these transac- tions are logged in files under the /usr/spool/uucp/.Log/ directory. The files are named daemon_name/system, where the daemon_name direc- tory is named for the daemon involved and the system file is named for the remote system the daemon is contacting. The uucp and uuto commands call the uucico daemon. The uucico activities are logged in the system file in the /usr/spool/uucp/.Log/uucico directory. The uux and uusend commands call the uuxqt daemon. The uuxqt activities are logged in the /usr/spool/uucp/.Log/uuxqt/system file. You can examine these individual log files by issuing the uulog command directly. However, you can also have these temporary log files appended to a primary log file that you can then examine. This is called compacting the log files and is handled by uudemon.cleanu, a shell script in /usr/lib/uucp. NOTES
The uulog utility is marked LEGACY in XCU Issue 5. EXAMPLES
To display the uucico log file for system hera, enter: uulog -s hera [Tru64 UNIX] To display the uuxqt log file, enter: uulog -x [Tru64 UNIX] To display the last forty lines of the file transfer log for system zeus, enter: uulog -f zeus -40 To display the uucico log file for systems pluto and venus, enter: uulog pluto venus [Tru64 UNIX] To display the uuxqt log file for systems pluto and venus, enter: uulog -x pluto venus FILES
Contains log files. Public directory. SEE ALSO
Commands: ct(1), cu(1), tail(1), tip(1), uucico(8), uucleanup(8), uucp(1), uuencode(1), uudecode(1), uuname(1), uupick(1), uusched(8), uusend(1), uustat(1), uuto(1), uux(1) Standards: standards(5) uulog(1)
All times are GMT -4. The time now is 04:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy