Hello!
I'm writing a shell script that will monitor if a server is up or down.
I would like to use the command "at" inside of my script to reschedule the script to run in 2 minutes but I can't pass parameters to my script and this is my problem...
This is the idea behind the script:
... (2 Replies)
Hello,
I need to capture everything showed on a screen by a shell script which needs user interaction. The shell script performs commads such as rsh so normal redirection to a file does not work.
I know there is a special unix command call "script" which records screen session but the... (4 Replies)
Hi Guys,
I have a following code in cm1.sh script.
cnt=`sqlplus -s <un>/<pwd> << !EOF
set heading off verify off pagesize 0
select count(*) from fnd_svc_components where component_name like '%Mailer%' and component_status != 'RUNNING';
exit;
!EOF`
echo $cnt
if ; then
sqlplus -s... (1 Reply)
Getting "syntax error at line 19: `<<' unmatched" trying to run sftp in a ksh script.
...snip...
13 for each in $HOSTS;
14 do
15 if ;
16 then mkdir /usr/restore/$each
17 fi
18 cd /usr/restore/$each
19 sftp -b - server-1 <<EOF
20 get... (6 Replies)
Friends
I have pasted a script below
d08083: cat tests
#!/bin/ksh
if
then
rm -r Last-Previous
mv Previous Last-Previous
mv Current Previous
mkdir Current
#cd Current
mv $1 Current
else
cd Current
mv "$1\$2" Current\*\
fi (4 Replies)
Hi,
This is odd, however here goes. There are several shell scripts that run in our production environment AIX 595 LPAR m/c, which has sufficient memory 14GB (physical memory) and horsepower 5CPUs. However from time to time we get the following errors in these shell scripts. The time when these... (11 Replies)
hello everybode.Got some sort of "problems" with this stuff;
well this is a program
int main()
{
int Pipe;
int origStdin, origStdout;
int childPID;
origStdin = dup(0);
origStdout = dup(1);
pipe(Pipe);
if( (childPID = fork()) < 0 )
{
perror(... (2 Replies)
All,
In my script i am having the first line as
"#! /bin/ksh"
I see there is a space between #! and /bin ..
My script is working fine and it is not causing any problem.But some time this script is very slow in processing and even some time the script hangs we need to kill and... (5 Replies)
Hello,
The INPUT file a.txt contains this
a
a
a
b
b
b
I'm trying to execute this shell script from the Unix Command Line like this:
./k.sh a.txt > newfile.txt
#!/usr/bin/sh
infile="$1"
awk '{print $0;}' < $infile
I get this error message on the command line: (9 Replies)
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
LEARN ABOUT CENTOS
pmdelprofile
PMDELPROFILE(3) Library Functions Manual PMDELPROFILE(3)NAME
pmDelProfile - delete instance(s) from the current PMAPI instance profile
C SYNOPSIS
#include <pcp/pmapi.h>
int pmDelProfile(pmInDom indom, int numinst, int *instlist);
cc ... -lpcp
DESCRIPTION
The set of instances for performance metrics returned from a pmFetch(3) call may be filtered or restricted using an instance profile.
There is one instance profile for each context the application creates at the Performance Metrics Application Programming Interface
(PMAPI), and each instance profile may include instances from one or more instance domains (see pmLookupDesc(3)).
pmDelProfile may be used to delete instance specifications from the instance profile of the current PMAPI context.
In the simplest variant, the list of instances identified by the instlist argument for the indom instance domain are removed from the
instance profile. The list of instance identifiers contains numinst values.
The indom value would normally be extracted from a call to pmLookupDesc(3) for a particular performance metric, and the instances in
instlist would typically be determined by calls to pmGetInDom(3) or pmLookupInDom(3).
If indom equals PM_INDOM_NULL or numinst is zero, then all instance domains are selected for deletion. If instlist is NULL, then all
instances in the selected domain(s) are removed from the profile.
To disable all available instances in all domains, use pmDelProfile(PM_INDOM_NULL, 0, NULL). This is the only situation in which indom may
be PM_INDOM_NULL.
SEE ALSO pmAddProfile(3), PMAPI(3), pmFetch(3), pmGetInDom(3), pmLookupDesc(3), pmLookupInDom(3), pmNewContext(3), pmUseContext(3) and pmWhichCon-
text(3).
DIAGNOSTICS
PM_ERR_PROFILESPEC
indom was PM_INDOM_NULL and instlist was not empty
CAVEAT
It is possible to delete non-existent instance domains and non-existent instances from an instance profile. None of the routines that use
the instance profile will ever issue an error if you do this. The cost of checking, when checking is possible, outweighs any benefits.
Performance Co-Pilot PCP PMDELPROFILE(3)