Thinking Out Loud

July 18, 2007

rpm -q –whatprovides

Filed under: CentOS,linux,RedHat — mdinh @ 4:44 pm

I have taken on a small role in Linux system administration.

I normally use xclock to verify X configuration. Wait, there is no xclock on the server; however it is installed on another server.

Here is what I did.

 [root@hawk ~]# which xclock
 /usr/X11R6/bin/xclock
 [root@hawk ~]# rpm -q --whatprovides /usr/X11R6/bin/xclock
 xorg-x11-tools-6.8.2-1.EL.18
 [root@hawk ~]#

 

July 9, 2007

rsync is cool

Filed under: linux — mdinh @ 5:23 pm

I recommend using SSH with private and public key with rsync for simplicity.

http://www.ibm.com/developerworks/eserver/library/es-ssh/?ca=dgr-lnxw06ParallelCommandsWithSSH

Configuration:

Server 172.24.223.52 contains a shell script to add date to t.log when executed:

:/home/oracle$ cat t.sh
date >> t.log

Use rsync to synchronize files across servers:

:/home/oracle$ rsync -arvvz –delete-after –rsh=/usr/bin/ssh 172.24.223.52:/home/oracle/t.log /home/oracle/t2.log
opening connection using /usr/bin/ssh 172.24.223.52 rsync –server –sender -vvlogDtprz . /home/oracle/t.log
receiving file list …
[sender] expand file_list to 131072 bytes, did move
done
delta transmission enabled
/home/oracle/t2.log
total: matches=0  tag_hits=0  false_alarms=0 data=58

sent 36 bytes  received 267 bytes  606.00 bytes/sec
total size is 58  speedup is 0.19

Updated file:

:/home/oracle$ cat t2.log
Mon Jul  9 16:41:53 UTC 2007
Mon Jul  9 16:42:36 UTC 2007

Executing rsync again shows file is up to date:

:/home/oracle$ rsync -arvvz –delete-after –rsh=/usr/bin/ssh 172.24.223.52:/home/oracle/t.log /home/oracle/t2.log
opening connection using /usr/bin/ssh 172.24.223.52 rsync –server –sender -vvlogDtprz . /home/oracle/t.log
receiving file list …
[sender] expand file_list to 131072 bytes, did move
done
delta transmission enabled
/home/oracle/t2.log is uptodate
total: matches=0  tag_hits=0  false_alarms=0 data=0

sent 16 bytes  received 187 bytes  406.00 bytes/sec
total size is 58  speedup is 0.29

Execute shell script remotely:

:/home/oracle$ ssh 172.24.223.52 /home/oracle/t.sh

Synchronize file:

:/home/oracle$ rsync -arvvz –delete-after –rsh=/usr/bin/ssh 172.24.223.52:/home/oracle/t.log /home/oracle/t2.log
opening connection using /usr/bin/ssh 172.24.223.52 rsync –server –sender -vvlogDtprz . /home/oracle/t.log
receiving file list …
[sender] expand file_list to 131072 bytes, did move
done
delta transmission enabled
/home/oracle/t2.log
total: matches=0  tag_hits=0  false_alarms=0 data=87

sent 42 bytes  received 273 bytes  630.00 bytes/sec
total size is 87  speedup is 0.28

Updated file:

:/home/oracle$ cat t2.log
Mon Jul  9 16:41:53 UTC 2007
Mon Jul  9 16:42:36 UTC 2007
Mon Jul  9 16:43:04 UTC 2007

July 2, 2007

Useful Scripts for Data Guard

Filed under: oracle — mdinh @ 5:57 pm

For Data Guard environments, I find the following scripts very useful. 

Script to Collect Data Guard Primary Site Diagnostic Information
Note:241374.1

Script to Collect Data Guard Physical Standby Diagnostic Information
Note:241438.1

Script to Collect Data Guard Logical Standby Table Information
Note:269954.1
 

Create a free website or blog at WordPress.com.