You are currently browsing the Uncategorized category

SYSSTAT: SAR/IOSTAT

February 25, 2010 - 1:30 pm

The pidstat command is used to monitor processes and threads currently being managed by the Linux kernel. It can also monitor the children of those processes and threads.
With its -d option, pidstat can report I/O statistics, providing that you have a recent Linux kernel (2.6.20+) with the option CONFIG_TASK_IO_ACCOUNTING compiled in. So imagine that your…

SYSSTAT: SAR/IOSTAT - continue reading

Comment on SYSSTAT: SAR/IOSTAT

Tags:

Quick SCP

February 25, 2010 - 11:39 am

Logged into source host
scp -r -p * root@remotehost:/home/user/public_html
This will copy *all* files to the directory /home/user/public_html in the remote server remotehost. The -p preserves the modification and access times, as well as the permissions of the source-file in the destination-file. The -r copies the contents of the source-file (directory in this case) recursively.

Quick SCP - continue reading

Comment on Quick SCP

Tags:

Updated find to list script

January 20, 2010 - 3:52 pm

This is an update to the earlier script.

#!/bin/sh
# v1 jcz 30-dec-2009
# This is a silly little script that will search
# for files of a certain type and create a text file of the results
# TODO:
#  – Everything
# – Fix this script to run under cygwin 1.7.X after working fine under 1.5.X

############################
# enable for debugging #####
############################
#…

Updated find to list script - continue reading

Comment on Updated find to list script

UPDATE_ON column in MySQL with trigger

September 19, 2008 - 3:23 pm

I needed to update a column with the date and time whenever a record changed in my database. So here is the recipe for the trigger in MySQL 5.0.
DELIMITER $$
CREATE    /*[DEFINER = { user | CURRENT_USER }]*/    TRIGGER `my_database`.`UpdatedOn` BEFORE UPDATE    ON `my_database`.`my_table`    FOR EACH ROW BEGINset NEW.update_on = now();    END$$
DELIMITER ;

UPDATE_ON column in MySQL with trigger - continue reading

Comment on UPDATE_ON column in MySQL with trigger

Auto File transfer/copying with SCP

September 19, 2008 - 1:45 pm

Here is a
Here is a script (below) you can use to copy dump files between machines using scp from an
automated script. Please see attached. The script usage is as
follows:
./auto_scp.sh  
local_file   user@host:remote_folder  
user_password
or
./auto_scp.sh  
user@host:remote_file   local_folder  
user_password
Example:
./auto_scp.sh   dump.dmp   oracle@hostname:/U01/oracle
  <oracle password>
and here is the script————————————————–
#!/usr/bin/expect -f
# connect via scpspawn scp “[lindex $argv 0]” “[lindex $argv 1]” #############################################expect {-re “.*es.*o.*” {exp_send “yes\r”exp_continue}-re…

Auto File transfer/copying with SCP - continue reading

Comment on Auto File transfer/copying with SCP

Open Source County – Impressive Geospatial Portal

July 22, 2008 - 11:24 am

I keep having to fish around for this URL so I’m just going to blog into this online note space that I maintain. One stop shopping.
http://maps.co.mecklenburg.nc.us/gp/
This is the Mecklenburg County GIS data portal to both environmental and cadastral-type information. I ran across it some time ago as an avid reader of Tobin Bradley’s excellent blog…

Open Source County – Impressive Geospatial Portal - continue reading

Comment on Open Source County - Impressive Geospatial Portal

Handy shell file lister for cygwin or *NIX

July 5, 2008 - 6:59 pm

This tip is useful for any system with a useful implementaion of ls, wc, and awk. However, some options may need to be modified. For example, the ls options work best on linux, though they suffice on my cygwin install on Windows when my username does not have a space in it

The commands for running…

Handy shell file lister for cygwin or *NIX - continue reading

Comment on Handy shell file lister for cygwin or *NIX

Tags:

Top