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…
You are currently browsing the Uncategorized category
SYSSTAT: SAR/IOSTAT
Quick SCP
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.
Updated find to list script
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 #####
############################
#…
UPDATE_ON column in MySQL with trigger
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 ;
Auto File transfer/copying with SCP
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…
Open Source County – Impressive Geospatial Portal
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…
Comment on Open Source County - Impressive Geospatial Portal
Handy shell file lister for cygwin or *NIX
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…