in this morning, i’ve make a simple script for copying files from server A to server B. When i try to use sshles password, my remote-server always asked me a password. i’ve give up configuring sshless password between server A to server B, so i try to use FTP. little bit tricky i think, but this is only the way. Here’s the simple script for uploading file via FTP in bash :

cd /backup/backup/db/
ls -lash
ftp -inv $HOST << EOF

# Call 2. Here the login credentials are supplied by calling the variables.

user $USER $PASS

# change to the FTP directory where you want to put or get
cd /tmp

# Upload A file to FTP server using put

put uji_coba-`date +%Y-%m-%d`.ypt
# or downloading file from ftp server
# get uji_coba-`date +%Y-%m-%d`.ypt


SNMP filling up /var/log/messages

i have 10 oracle enterprise linux running as server. and i want to monitor those server activity (traffic,memory usage, disk usage and etc). i’ve configuring snmp on those server. after 1 week snmp agent running on those server, i’ve shocked. everytime snmp manager run get-request message, and agent gave reply with get-reply message, it logged to /var/log/messages. i dont want my /var/log/messages filled up with snmp log request. And how to fix that problem ?

open file /etc/sysconfig/snmpd.options, and add these following lines :

OPTIONS=”-LS 0-4 d -Lf /dev/null -p /var/run/snmpd.pid”

restart your snmp service, and done 🙂