Programming :: SQL Script To Check Status Of Last Command?

Aug 7, 2009

I need to make a SQL script and call it from Unix (bash) shell.

Code:

sqlplus vikas/vikas <<END
spool /oracle/vikas/output.txt
command 1

[code]....

This runs perfectly, but my problem is that if a command fails, the other commands keeps on running. I need to keep a check that when a command fails the script is exited. In unix we have an option of echo $? to check the status of previous command, But how to accomplish this SQL.

View 2 Replies


ADVERTISEMENT

Programming :: Make A Script That Will Check Service/s Status Whether Running Or Stop?

Sep 6, 2010

how to make a script that will check service/s status whether running or stop and also will run stop services?

View 9 Replies View Related

Hardware :: Using Iscan By Epson CX9300F - Could Not Send Command To Scanner - Check Scanner's Status

Mar 17, 2010

After downloading and installing iscan and run it i see this message:

Could not send command to scanner. Check scanner's status.

After command sane-find-scanner:

And this message is result of scanimage command:

No scanners were identified. If you were expecting something different, check that the scanner is plugged in, turned on and detected by the sane-find-scanner tool (if appropriate). Please read the documentation which came with this software (README, FAQ, manpages).

View 4 Replies View Related

Ubuntu Installation :: Device Busy Using Image Scan - Reports Could Not Send Command To Scanner Check The Scanner Status

Apr 9, 2010

Have Karmic 9.10 ,Changed from Epson RX595 all in 1 (uses a ton of ink)Got the Lexmark Pro 805 3 in 1 because it says it supports Linux and the ink cartridge only cost $5 downloaded drivers and printer works but using Xsane Image Scanner error reports

'Lexmark_1_0_0:libsub/001/009': Device busy Using Image Scan - reports Could not send command to scanner Check the scanner status. The RX595's scanner drivers had to been manually instatlled,, in the Printer box the Lexmark shows available..

View 3 Replies View Related

Programming :: Using The Process Status (ps) Command In A Bash Script?

May 27, 2009

I am new to scripting and been working on this bash script for awhile now. I been researching this problem, but I can't seem to find a solution. I was wondering if someone could please help me out. Here is my script:

#!/bin/bash
NO="ps -ef | grep NO | grep -v grep"
NOWC=`ps -ef | grep NO | grep -v grep | wc -l`

[code].....

I cannot get this script to run the "ps -ef" command on the client. It get its value from the host machine that I am running this script from. I need this command to execute on the client. When I run the command (ps -ef | grep NO | grep -v grep) on the client, I get something back. Here is what I get when I try to debug the script.

XX# ./test_ps5.sh XXXXX
+ NO='ps -ef | grep NO | grep -v grep'
++ ps -ef

[code]....

View 5 Replies View Related

Programming :: Check Command Line For A Word?

May 23, 2010

I'm building a script for my place of employment. The next step in it is checking what the user input was. Determining if they added a part in there or not. The script prompts for a hostname. Hostnames are localhost.localdomain. Now, I want the script to check to see if they put localdomain and if they did, not to add the domain to the /etc/sysconfig/network, but just what they entered. So say the user inputs:

[Code]....

View 4 Replies View Related

Programming :: Command In Bash Script To Check If Tar Is Currupt Or Not?

Jan 20, 2011

As part of my script I need to compress a 50Gb file. but I need to check that the compressed is not corrupt if it is ok it will then send it over if not it will report an error.

cd /home/ops/Desktop/temp
tar czvf backup-"$(date +%d-%b-%y)".tgz /home/ops/Desktop/temp

I need some here to check the compress file then somelike if the file is

if
send the file
else
send an e-mail reporting a failure

View 4 Replies View Related

Red Hat / Fedora :: How To Check The Network Status

May 20, 2009

want to know what is the cmd to ping/check the link speed or something like Network Info. If for server checking (Show information CPI info) is (cat /proc/cpuinfo ) (correct me if im wrong)

View 4 Replies View Related

Hardware :: How To Check RAID Status

Jul 15, 2009

We have a Dell Poweredge 1750 server with 2 harddrives in RAID 1 running Debian Etch. Yesterday one of the hardrives stopped working but no error message appeared in syslog. The only indication was the amber LED diode. Is there a software way how to check that both disks are OK?

View 5 Replies View Related

General :: Check Status Of A Shell Script?

Aug 2, 2010

I'm running CentOS 5.5 and have created an init script. The start of the script contains:

# Source function library.
if [ -f /etc/init.d/functions ]; then
. /etc/init.d/functions
fi

The start bit works fine, but I'm having problems with the status and stop part:

status)
echo -n "Status of script: "
status "/bin/sh /path/to/script.sh"
RETVAL=$?
echo
;;

In PS AUX the command appears as "/bin/sh /path/to/script.sh" and I can see the PID. But when I run:

./my_init_script status

It says the script is not running. Should I be using the /bin/sh bit, or just the full script path, or just the script filename?

The stop part of the init script utilises "killproc". Again what command should I be using to successfully kill all occurrances of the script?

View 1 Replies View Related

Ubuntu :: How Can I Check Status Of User Partition

Nov 20, 2010

Ubuntu server, no GUI installed; two partitions: OS and user.How can I check the status of the user partition? E.g. Free space, directory, etc

View 2 Replies View Related

Slackware :: Check Proccess Status With /dev/urandom?

Feb 24, 2011

dd is wiping part of the hard drive( 270GB partition ) with /dev/urandom for quite some hours, is there anyway to check the proccess? like speed of the process etc., I read someone doing that with another drive while having access to other terminal because of the system, but since this is directly from the install dvd, I've no clue if there's anyway to do that or not. I'm asking that mainly because:

1) I prefer run things with some kind of verbose mode

2) I accentaly opened the dvd driver (yes I know, but I forgot the install dvd was inside of it), but I closed it right after it, no errors, but it may have stopped working and has just the _ clicking?

View 14 Replies View Related

Debian :: Unable To Check Status Of A Cups Printer?

Oct 15, 2010

I'm using Debian squeeze and for an assignement, i have create 2 virtual pdf cups printers. Both are working very well. To test the different administion command; i try to disable one of the printer and move his queue file to the second one. I'm able to do it easily.

Now, i wish to write a bash script that wil test the status of the printer. So that,if the printer is disable, it just execute the "move" script. Is there a way to know the status of a cups printer and use that information in a script?

For example, a command/function that can return "O" is the cups printer is enable and "1" if not.

View 1 Replies View Related

Ubuntu :: Check The Status Of Software Raid Array?

May 21, 2011

In Zentyal, it showed me active drives, if the array was degraded, and if there was any syncing happening when the array was building. How can I check that without Zentyal? Is there a terminal command or an application I can install to tell me the same information?

View 2 Replies View Related

Hardware :: Check The Status Of A Switch Though Serial Port?

Oct 20, 2010

I would need to monitor the status of an electric relay. To do so I was thinking the serial port and perl (as I don't know C ) how to check if a switch connected to a serial port is open or closed. Here is my plan, I'll plug a electric relay on the electric network and monitor the state of the switch. if the switch is closed, that mean that we are on the electric network if the switch is open that mean that we are on our diesel power generator.

PS: There will be no voltage input involve (although I can if that's required)

I'm planning to use this with Nagios to know if we are on the electric network or on our diesel power generator.

View 3 Replies View Related

General :: Check The Status Of Mouse-button/ A Key Press Using C ?

Jun 23, 2011

1) check if a mouse button is pressed down. I need to check this status of mouse button again and again inside a loop. Depending on the status, some function will be called. OR

2) check if some key of the keyboard is pressed down. I need to check this status of 'key' again and again inside a loop. Depending on the status, some function will be called.

Either of the two above will serve my purpose.

I am using Ubuntu 10.10.

View 4 Replies View Related

Software :: Finding A Monitoring Tool To Check Services Status?

Apr 20, 2010

I there a monitoring tool that will alert me if one of the linux service is off? example MySQL, http, SSH,...etc

View 7 Replies View Related

Programming :: Bash Script: Check Stderr After Command "find"?

Jul 8, 2009

I use command "find" in my bash script: if the filename exist command find work quiet, and if the filename not exist I see the message "find: /tmp/filename: No such file or directory". My problem is following, i want to have in my script something like this:

find "/tmp/filename" -type f -delete | "if no_any_errors execute command1" , if file_not_found execute command2"

View 1 Replies View Related

Debian Configuration :: Cannot Check Battery Status In Jessie ASUS EeeBook X205TA

Jul 22, 2015

I use jessie-32bit of kernel 4.1.3 on ASUS EeeBook X205TA. But it doesn't recognize buttery status.Result of my investigation, the incomprehensible ponts is below.

・"acpi -b" outputs no information.
・There is not "battery" directory in /proc/acpi/. (button only exists.)

The following is my system informations.
Code: Select allacpi -V
Adapter 0: on-line
Cooling 0: intel_powerclamp no state information available
Cooling 1: Processor 0 of 10

[code]...

I want to check battery in console and fluxbox Desktop.

View 2 Replies View Related

Ubuntu Installation :: /usr/lib/libgconf2-4/gconf-sanity-check-2 Exited With Error Status 256

Sep 6, 2010

yesterday i tried to install bt4 from alongside ubuntu 10.04. Unfortunately the DVD had some errors and the installation stopped. Everything was fine till then, even the GRUB was working(i guess!) but when i tried to log into my Ubuntu it gave me an error... " /usr/lib/libgconf2-4/gconf-sanity-check-2 exited with error status 256" also there was a popup like "gnome power management was not properly installed ....blah blah blah Contact you network admin"

i have only one user on that system. i tried the single user mode but no success... i then tried to Ctrl+Alt+F1-F6 no success... can't switch to command line(this is my display problem i guess)

i have now decided to install a fresh install but i do need to take the backup. What all should i copy to the new install so that i get the same feel as before?

View 1 Replies View Related

Ubuntu :: Error After Updates - Gconf-sanity-check-2 Exited With Status 32512

Jul 22, 2011

I ran update through the terminal and rebooted i get this error message on start up and again after I log in Please Help!! I'm running Ubuntu 11.04 using unity 2d and the latest version of Gnome 2 on a Dell Inspiron 5150 laptop There is a problem with the configuration server. (/usr/lib/libgconf2-4/gconf-sanity-check-2 exited with status 32512)

View 5 Replies View Related

Programming :: Check Menu & Check List In Utility Dialog?

Aug 19, 2010

I want to put check menu & check list in utility dialog.i dont know how i do this

View 1 Replies View Related

Ubuntu :: Hardware Drivers "Downloading Package Indexes Failed, Please Check Your Network Status?

Feb 24, 2011

I tried changing the source to a few different ones and I picked "Select Best Server". Still getting the same msg. I am on a wired connection and there is nothing wrong with my connection.Anyone know the solution if not how do I install nvida drivers?

View 1 Replies View Related

General :: Check The Snmpd Is Really Running Apart From Service Snmpd Status?

Feb 8, 2010

I have six linux Centos 5.0 Servers. I had to configure the snmp client. I just created a pretty basic configuration snmpd.conf file

Code: rocommunity CompanyCom 10.1.1.10

I installed all of these

lm_sensors-2.10.7-4.el5.i386.rpm
net-snmp-libs-5.3.2.2-7.el5.i386.rpm
net-snmp-5.3.2.2-7.el5.i386.rpm
net-snmp-utils-5.3.2.2-7.el5.i386.rpm

4 of them are working fine, the application installed on 10.1.1.10 can query 4 servers but I got 2 Linux Centos that are in a DMZ, and my networking team already opened ports and configured NAT but the SNMP Server 10.1.1.10 is not able to query them how can I check the snmpd is really running apart from service snmpd status? might be related with the DMZ configuration?

View 3 Replies View Related

General :: Status Of Background Command?

Jan 17, 2011

how to get the status of background command in bash script

supose , rm 1 &
rm 2
how to get status of rm 1 command

View 3 Replies View Related

Server :: If Server Failed Or Offline - Any Way To Check Status?

Mar 9, 2011

I would like to implement something when a server is offline for whatever reason. For example. I got my own DNS servers and webservers. I would like it if the users goes to www.somedomain.com and the server it is actually on is down for maint. or For whatever not able to respond. What can be done so that if the server isn't able to be contacted that it can point to either a another server or the dns somehow can display a page stating who to contact to report a problem or to let them know its down for maint. And can goto a site to check the status or whatever.

View 7 Replies View Related

Hardware :: Command In Know The Processor Temperature And Its Status?

Mar 14, 2010

is there any command in linux to know the processor temperature and its status?with root permissions i tried with using the proc commd.... it gave io error saying permissiondenied....thru these system details are obtaind/proc/filesystems/proc/cpuinfosince im not familiar with its usage,so how this proc cmmd should be used to extract the required info abt the system & display them?

View 4 Replies View Related

General :: Cli Command For Logging The Status Of A NIC - Eth0?

Jan 20, 2010

I would like to know if it's possible to create a continual log for a network interface card's status. That is whether it's up or down and time and date stamped if possible.I'm wondering if there is a cli command that exists to do this I've looked at "ethtool" but this only sets the parameters of the nic.Also looked at the log files that I could find /dev/log var/log, but there is no mention of a status for eth0.

View 3 Replies View Related

OpenSUSE Install :: Not Working Right - Error "There Is A Problem With The Configuration Server (/usr/lib/Gconf-sanity- Check - 2 Exited With Status 256"

Jun 20, 2011

Having downloaded 11.4 Gnome, finding it did not install I bought it on DVD from ebay, when trying DVD installation my PC is displaying: There is a problem with the configuration server (/usr/lib/Gconf-sanity- check - 2 exited with status 256, I would like to install this rather then just run it off disk

View 9 Replies View Related

Fedora :: Echo Exit Status After Command Is Run In Terminal?

Feb 19, 2010

command will just execute and exit with a status of "0" -"Every command returns an exit status (sometimes referred to as a return status ). A successful command returns a 0, while an unsuccessful one returns a non-zero value that usually may be interpreted as an error code. Well-behaved UNIX commands, programs, and utilities return a 0 exit code upon successful completion, though there are some exceptions."[URL]With the command . . .

Code:

# dosfsck -v /dev/sdb

it could be very helpful (and decide my next move) to see the exit code as 0, 1, or 2 . the man page suggests the command exit code will specify if the message I get - "Cluster size is zero" (I think it is a "1")is a recoverable or fixable error by the utility. or is non-recoverable - a pretty nifty feature if I understand this right. [URL] is there anything like this script COMMAND_LAST used in the following link. [URL] that can be entered in the terminal window after - or at end of - my dosfsck command or any command. just to see if it has a 0, 1, or 2 status ?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved