Sponsored Content
Full Discussion: Append log file through ssh
Top Forums Shell Programming and Scripting Append log file through ssh Post 302329853 by LRoberts on Monday 29th of June 2009 02:20:03 PM
Old 06-29-2009
Append log file through ssh

Hello....

I am attempting to append a master log file with the contents of log files that are contained on about 7 servers.

Code:
#!/bin/sh
> /gfs/infr/esm/scripts/DBA_FILESYSTEM_REPORT.LOG
######################################################################
# Server Delphin / OS: Solaris
######################################################################
/lcl/bin/ssh delphin "/lcl/apps/Tivoli/omnibus_procedure_scripts/DBA_FILESYSTEM_LOGGER.LOG >> /gfs/infr/esm/scripts/DBA_FILESYSTEM_REPORT.LOG" &

######################################################################
# Server Angel / OS: Solaris
######################################################################
/lcl/bin/ssh angel "/lcl/apps/Tivoli/omnibus_procedure_scripts/DBA_FILESYSTEM_LOGGER.LOG >> /gfs/infr/esm/scripts/DBA_FILESYSTEM_REPORT.LOG" &

######################################################################
# Server Kraken / OS: Solaris
######################################################################
/lcl/bin/ssh kraken "/lcl/apps/Tivoli/omnibus_procedure_scripts/DBA_FILESYSTEM_LOGGER.LOG >> /gfs/infr/esm/scripts/DBA_FILESYSTEM_REPORT.LOG" &

######################################################################
# Server Prowler / OS: Solaris
######################################################################
/lcl/bin/ssh prowler "/lcl/apps/Tivoli/omnibus_procedure_scripts/DBA_FILESYSTEM_LOGGER.LOG >> /gfs/infr/esm/scripts/DBA_FILESYSTEM_REPORT.LOG" &

######################################################################
# Server Bluemarron / OS: Linux
######################################################################
/lcl/bin/ssh bluemarron "/lcl/apps/Tivoli/omnibus_procedure_scripts/DBA_FILESYSTEM_LOGGER.LOG >> /gfs/infr/esm/scripts/DBA_FILESYSTEM_REPORT.LOG" &

######################################################################
# Server Penguinshrimp / OS: Linux
######################################################################
/lcl/bin/ssh penguinshrimp "/lcl/apps/Tivoli/omnibus_procedure_scripts/DBA_FILESYSTEM_LOGGER.LOG >> /gfs/infr/esm/scripts/DBA_FILESYSTEM_REPORT.LOG" &

######################################################################
# Server Leviathan / OS: Solaris
######################################################################
/lcl/bin/ssh leviathan "/lcl/apps/Tivoli/omnibus_procedure_scripts/DBA_FILESYSTEM_LOGGER.LOG >> /gfs/infr/esm/scripts/DBA_FILESYSTEM_REPORT.LOG" &

However when I try the above I get....
Code:
cannot execute [Permission denied]

I am not sure why. These servers are listed in the .shosts file and I am able to ssh to them just fine. Now the master file I am attempting to append is on our NAS. Not sure if that maybe is the issue.

---------- Post updated at 10:20 AM ---------- Previous update was at 10:18 AM ----------

DUH! Helps if I use more. ;-) Just noticed.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Append error message to the log

In my unix system , I chceck that there are error message append to the /var/adm/syslog . But I also found that part of these message will pop to my login session ( I use telent to login to server ) , I also check the /var/mail/my_loginid is empty , could suggest how can I forbid the message pop to... (1 Reply)
Discussion started by: ust
1 Replies

2. Shell Programming and Scripting

crontab jobs to append to the same log

Hi, all: I have a shell script runs in the crontab, which writes the output to a log file, as following: 0 18 * * * /oracle/deleteBackup.sh >/oracle/deleteBackup.log Everytime the script is run by crontab , the deleteBackup.log is overwritten, is there anyway that I can append to the... (2 Replies)
Discussion started by: ericaworld
2 Replies

3. UNIX for Advanced & Expert Users

Shell script to append a time for the existing error log file

Hi Guys, the requirement is like this, i am having a error log file in this format, 4594.493: parallel nursery GC 2594592K->2544691K (2969600K), 30.848 ms 4605.958: parallel nursery GC 2634887K->2584986K (2969600K), 38.900 ms 4619.079: parallel nursery GC 2822555K->2774812K... (12 Replies)
Discussion started by: gsprasanna
12 Replies

4. Shell Programming and Scripting

shell script to read a line in gps receiver log file and append that line to new file

Hi, I have gps receiver log..its giving readings .like below Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. GPSD,R=1 $GPGSV,3,1,11,08,16,328,40,11,36,127,00,28,33,283,39,20,11,165,00*71... (3 Replies)
Discussion started by: gudivada213
3 Replies

5. Shell Programming and Scripting

Create log file in NFS via SSH

OS: Sun Solaris ver 9 From server1: as root userid ssh server2 /export/home/user1/.ssh/s2.sh logtest=/export/home/user1/test.log log1=/u03/user2/comn/admin/log/ uname -a >> $logtest --> log file able to generate uname -a >> $log1 --> not able to as /u03/user2/comn/admin/log is NFS from... (3 Replies)
Discussion started by: KhawHL
3 Replies

6. Shell Programming and Scripting

Append Text To Remote Servers File Via SSH

Gentleman & Ladies, Please make me feel like and novice and explain why this is not working? I am attempting to ssh to a remote server via ssh and keys. I want to inject a file on the remote server with text. I am not achieving this. I would like to echo/inject the text on the remote... (1 Reply)
Discussion started by: abacus
1 Replies

7. Shell Programming and Scripting

log file append

hi, I am working on perl script, printing useful info from script and while running appending to one file to maintain log. Log generates but at the end of the script and not continuously. I cant monitor whats happening.... Any specific reason? (5 Replies)
Discussion started by: Deei
5 Replies

8. Shell Programming and Scripting

remotely append crontab over ssh

Hi I would like to append/modify crontab remotely over ssh and this is what i have tried so far. text.txt contains the following line. 0,15,30,45 * * * * /home/local/hello.sh cat text.txt |ssh $host 'tee' but i dont know how to edit the crontab here after piping it to tee command. (2 Replies)
Discussion started by: xiamin
2 Replies

9. Shell Programming and Scripting

Delete log files content older than 30 days and append the lastest date log file date

To delete log files content older than 30 days and append the lastest date log file date in the respective logs I want to write a shell script that deletes all log files content older than 30 days and append the lastest log file date in the respective logs This is my script cd... (2 Replies)
Discussion started by: sreekumarhari
2 Replies

10. Shell Programming and Scripting

Append date to sql*plus spool (log) file in shell script

SQL*Plus version : 11.2.0.4 OS : Oracle Linux 6.5 SQL*Plus is a client application to connect to oracle database. The log file for this tool is generated via spool command as shown below. I am trying to append date ( $dateString ) to spool file as shown below. $ cat test2.sh #!/bin/bash... (4 Replies)
Discussion started by: kraljic
4 Replies
ACTIVITY-LOG-MANAGER(1) 				      General Commands Manual					   ACTIVITY-LOG-MANAGER(1)

NAME
activity-log-manager - configure activity logging behavior SYNOPSIS
zeitgeist-global-privacy [OPTIONS] DESCRIPTION
activity-log-manager is a tool for easily setting up blacklists, temporarily stopping all logging and accessing other privacy-related con- trols related to your activity log. OPTIONS
The program follows the usual GNU command line syntax, with options starting with two dashes (`--'). A summary of options is included below. --version Shows the version number and exits. -h, --help Shows a short help message listing all supported options and exits. SEE ALSO
zeitgeist-daemon, gnome-activity-journal BUGS
Please report any bugs on https://bugs.launchpad.net/history-manager. AUTHORS
Manish Sinha <manishsinha@ubuntu.com> Seif Lotfy <seif@lotfy.com> Siegfried Gevatter <siegfried@gevatter.com> Stefano Candori <stefano.candori@gmail.com> LICENSE
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER- CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. May 2, 2011 ACTIVITY-LOG-MANAGER(1)
All times are GMT -4. The time now is 11:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy