Sponsored Content
Top Forums Shell Programming and Scripting error in script path for tablespace usage Post 302310719 by capri_drm on Sunday 26th of April 2009 07:00:58 PM
Old 04-26-2009
error in script path for tablespace usage

Hi ,
I am trying to run this script in crontab but I get errors. When I run it explicitly like ./monitor_tblsp from another location then it runs fine . I am messing somewhere with paths but I don't know where and how . Please help .
Here is the error part

./monitor_tblsp[14]: touch: not found [No such file or directory]
./monitor_tblsp[15]: chmod: not found [No such file or directory]
./monitor_tblsp[16]: touch: not found [No such file or directory]
./monitor_tblsp[17]: chmod: not found [No such file or directory]
./monitor_tblsp[18]: touch: not found [No such file or directory]
./monitor_tblsp[19]: chmod: not found [No such file or directory]

Database Connection Information

Database server = DB2/LINUXX8664 9.5.0
SQL authorization ID = DB2ADMIN
Local database alias = WAG_HUB

TSP NAME TOTAL SPACE USED SPACE % USED

./monitor_tblsp: line 31: cat: not found
./monitor_tblsp[61]: sort: not found [No such file or directory]
./monitor_tblsp[68]: /tmp/tmp_fsps.out: cannot open [No such file or directory]
./monitor_tblsp[69]: rm: not found [No such file or directory]
./monitor_tblsp[70]: rm: not found [No such file or directory]
./monitor_tblsp: line 71: rm: not found


Here is some of the lines from the script

more monitor_tblsp
#!/bin/ksh
#Script to find tablespace usage

PATH=/usr/bin::/home/db2admin/sqllib/bin:/home/db2admin/sqllib/adm:/home/db2admin/sqllib/misc
DB2INSTANCE=db2admin
LD_LIBRARY_PATH=:/home/db2admin/sqllib/lib:/usr/lib:/lib
export PATH DB2INSTANCE


tmpfile_listts=/tmp/tmp_tsls.out
tmpfile_fsps=/tmp/tmp_fsps.out
tmpfile_fsps_sort=/tmp/tmp_fsps_sort.out

touch ${tmpfile_listts}
chmod 660 ${tmpfile_listts}
touch ${tmpfile_fsps}
chmod 660 ${tmpfile_fsps}
touch ${tmpfile_fsps_sort}
chmod 660 ${tmpfile_fsps_sort}

Thanks in advance !
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell Script to find the tablespace size in oracle.

Hi, I need to execute a script to find the tablespace size in oracle.But i get an error.:confused: Script Executed:- #!/bin/ksh ORACLE_SID= oracelinstance ORACLE_HOME= oracle path PATH=$ORACLE_HOME/bin export ORACLE_SID ORACLE_HOME PATH sqlplus... (4 Replies)
Discussion started by: vighna
4 Replies

2. HP-UX

how can I find cpu usage memory usage swap usage and logical volume usage

how can I find cpu usage memory usage swap usage and I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times my final destination is monitor process logical volume usage above X % and number of Logical voluage above can I not to... (3 Replies)
Discussion started by: alert0919
3 Replies

3. Shell Programming and Scripting

Need help in a shell script to edit a tablespace creation script.

Hi, CREATE TABLESPACE aps_blob_large01 DATAFILE '/c2r6u13/u03/oradata/qnoldv01/aps_blob_large0101.dbf' SIZE X 270532608 REUSE DEFAULT STORAGE (INITIAL 134217728 NEXT... (2 Replies)
Discussion started by: rparavastu
2 Replies

4. Shell Programming and Scripting

absolute path for a script ran with relative path

I have a script in which i want to print absolute path of the same script irrespective of path from where i run script. I am using test.sh: echo "pwd : `pwd`" echo "script name: $0" echo "dirname: `dirname $0`" when i run script from /my/test/dir/struct as ../test.sh the output i... (10 Replies)
Discussion started by: rss67
10 Replies

5. Shell Programming and Scripting

alias to a shell script - tablespace size

I have developed the following shell script. The idea was to create an alias to execute it and return the tablespaces and their sizes from an oracle database. When I execute is via the alias, I have issues. So, here is the script first: > cat ts_size.sh #!/bin/ksh xwhere=" " xwild=" "... (8 Replies)
Discussion started by: desibabu
8 Replies

6. Shell Programming and Scripting

tablespace monitoring script

I have prepared the below script to monitor the tablespace and alert the users whenever it reaches a threshold limit. #!/bin/sh . /home/.profile sqlplus -s $LOGON << .eof > $scripts/check_tablespace.temp set pages 0 select tablespace_name, free_percent from ( SELECT... (4 Replies)
Discussion started by: svajhala
4 Replies

7. Shell Programming and Scripting

Script to check Oracle tablespace

I'm new to unix script, and I need to check the tablespaces daily, here is the script(quite simple), but it does not work. Did I missed something ? Please guide me, Many thanks ! #!/bin/sh echo "ORA TABLEASPACE:" sqlplus system/oracle as sysdba; set pagesize 9999; set linesize 132; ... (5 Replies)
Discussion started by: dehetoxic
5 Replies

8. Shell Programming and Scripting

Path Error in script

Hi All, I copied an existing script so that I could make updates to it and test those updates. In both scripts I set the path which is the exact same in both scripts as I copied from the old to the new script. setting path is this command: # Add the path required for EMC commands to... (3 Replies)
Discussion started by: colinwilson1303
3 Replies

9. Shell Programming and Scripting

Error in Scripting to monitor tablespace in Oracle DB

Buddies, I am writing the below script 'tab.sh' to monitor the tablespaces in Database:- ------------------------------- export ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_2 export PATH=$PATH:$ORACLE_HOME/bin export ORACLE_SID=orcl sqlplus system/oracle as sysdba <<EOF spool... (5 Replies)
Discussion started by: sandip250382
5 Replies

10. Shell Programming and Scripting

Script error on tape usage

getting ./query: 0403-057 Syntax error at line 1 : `|' is not expected. here is the top portion of the script below. #!/bin/ksh DATE=`date +%b-%d` TIME=`date +%H%M` TIMEA=`date +%H:%M` STAT=stat.csv USERID=user PASSWD=user_password COMD="dsmadmc -id=$USERID -password=$PASSWD... (1 Reply)
Discussion started by: rvstovall
1 Replies
KEP_RELOAD(1)						      General Commands Manual						     KEP_RELOAD(1)

NAME
kep_reload - Update Predict's Keplerian elements SYNOPSIS
kep_reload DESCRIPTION
KEP_RELOAD is a simple utility that forces an immediate reload of PREDICT's Keplerian database through a socket connection while PREDICT is running in server mode. It is especially useful in environments where PREDICT runs continuously, and periodic Keplerian element updates are made outside of PREDICT, such as through scripts run through a crontab. The "kepupdate" script found in this directory is an example of a Keplerian element update script that can be run on an automated basis through a crontab. It is designed to be placed in your home directory under a subdirectory called "cronjobs". It downloads Keplerian orbital data from www.celestrak.com using the HTTP protocol. (The "wget" utility, available from the Free Software Foundation, is required, and is included in many Linux distrubutions.) Type crontab -e to edit your crontab. Simply add the following entry: 0 8 * * * kepupdate and your orbital database will update each morning at 8:00 AM (provided you have a network connection at that time). See the crontab man page for more information on editing your crontab. AUTHOR
This man page was written by A. Maitland Bottoms, AA4HS, for Debian GNU/Linux. 31 August 2003 KEP_RELOAD(1)
All times are GMT -4. The time now is 02:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy