Segregated the problematic portion, and showing for your view here.,
1. Following is the function definition,
create or replace function new_del(id integer) returns void as $$
begin
raise info 'dollar :%',$1;
delete from testing where id=$1;
end ;
$$
language 'plpgsql';
... (1 Reply)
Hi All
I have what seems to be something quite trivial but for the life of me can't work out a solution.
Basically, I have the following script that reads a version report that contains certain flags. If a condition is true, I want to print the value of column 2, sort them uniquely and return... (2 Replies)
Hi,
I have installed cygwin on my windows XP system. And I am trying to use the following code snippet:
set SERVER="grep JDBCConnectionPool config.xml | gawk -F; '{print $2}'"
sed -i 's/%SERVER%/WLMDEVDB1/' config.xml
But it doesn't work because at runtime %SERVER% gets replaced by "grep... (2 Replies)
Well as the title describes, its a pretty straight forward problem. I have a series of psql tables where there are lots of blanks. However there is at least one column, called name, that will never be blank. I want to write a select statement to get all of the contents of the table and then turn... (3 Replies)
Hey All,
Quick question...
I'm writing a short script to check if a continuous port is running on a server.
I'm using "ps -ef | grep -v grep | grep processName" and I was wondering if it was better/more reliable to just check the
return code from the command or if its better to pipe to... (12 Replies)
Hi All,
There are 2 scripts A and B.
A --> It will invoke script B
B -->
It will generate below output.
100 - connected
105 - Not Connected
210 - Connected
I want to return this value to script A. Please advice. (4 Replies)
cmd()
{
echo " "
echo "$(whoami)@$(hostname):$(pwd)# $*"
results=`eval $*`
echo $results
}
I want to get the eval $* 's return value and pass it to a new variable $val, and get "eval $*" 's the ... (7 Replies)
Hello
Just edited the entry to make it easier to understand what i want
How can i achieve this: GOAL:
read 2 field from a table with PSQL
result of this PSQL command is this
INSTALLEDLANG=$(su - postgres -c "psql -A -t -q -c -d ${DBNAME} -t -c 'SELECT code, iso_code from res_lang'")
... (0 Replies)
Hi,
I have a shell script containing multiple PSQL queries for which I want the output to be redirected to a text file.
psql -U postgres -d database -o textfile.txt << EOF
Query1;
Query2;
Query ....;
EOF
When executing the script, queries outputs are directed to textfile.txt, however... (2 Replies)
Discussion started by: nms
2 Replies
LEARN ABOUT DEBIAN
torrus_snmpfailures
TORRUS_SNMPFAILURES(8) torrus TORRUS_SNMPFAILURES(8)NAME
snmpfailures - Displays SNMP collector failures.
SYNOPSIS
torrus snmpfailures --tree=TREENAME [options...]
OPTIONS --details
In addition to failure counters, list the failed SNMP hosts and the time stamps of failure events.
--help
Displays a help message.
DESCRIPTION
This utility prints the SNMP collector failure information in JSON format. Without --details option, it prints only the failure counters.
Upon collector startup or after the tree re-compilation, the failure counters are reset to zero.
The output is very convenient for further automatic processing in any scripting language.
The top level of the output is a JSON object with the following name/value pairs:
total_unreachable: NUMBER
Displays the number SNMP hosts that are currently unreachable. The number adds up across multiple collector instances for a given
tree. If a host becomes reachable again, the number is decreased.
total_deleted: NUMBER
Displays the number SNMP hosts that are completely removed from SNMP collection for the life cycle of the collector process. This
happens when a host is unreachable for too long time and the collector gives up to reach it again. The number adds up across multiple
collector instances for a given tree.
total_mib_errors: NUMBER
Displays the number of MIB errors (noSuchObject, noSuchInstance, and endOfMibView) during the collector life cycle. The number adds up
across multiple collector instances for a given tree.
detail_unreachable: OBJECT, detail_deleted: OBJECT
If the option --details is specified, these objects contain the host names and timestamps of the failures. The keys are
contactenations of SNMP host, UDP port, and SNMP community separated by "|". The values are objects representing the UNIX timestamp
and a human-readable time string.
detail_mib_errors: OBJECT
If the option --details is specified, this object displays the MIB error details: for each SNMP host, it lists the datasource leaves
which had these errors and the event timestamps.
EXAMPLES
The following example illustrates an SNMP host unreachable:
torrus failures --tree=main --details
{
"detail_deleted" : {},
"detail_mib_errors" : {},
"detail_unreachable" : {
"217.101.101.101|161|public" : {
"time" : "Fri Jul 23 14:15:10 2010",
"timestamp" : 1279887310
}
},
"total_deleted" : 0,
"total_mib_errors" : 0,
"total_unreachable" : 1
}
The following example illustrates a MIB error:
torrus failures --tree=main --details
{
"detail_deleted" : {},
"detail_mib_errors" : {
"217.101.102.102|161|public" : {
"count" : 1,
"nodes" : {
"/Routers/CMTS3/Temperature_Sensors/sensor_01" : {
"time" : "Fri Jul 23 15:26:14 2010",
"timestamp" : 1279891574
}
}
}
},
"detail_unreachable" : {},
"total_deleted" : 0,
"total_mib_errors" : 1,
"total_unreachable" : 0
}
SEE ALSO torrus(8),
NOTES
See more documentation at Torrus home page: http://torrus.org
AUTHOR
Stanislav Sinyagin <ssinyagin@yahoo.com>
torrus 2.03 2013-07-26 TORRUS_SNMPFAILURES(8)