Hi,
I have a process that can be seen after "ps aux" command.
However when I do "top" command. This process
cannot be seen.
How can this happen? Is there anything wrong
with my code? (3 Replies)
Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)
Hello All,
I am a newbie in Shell script programming, and maybe you can help me with my query.
I need to write a shell script (mntServer.ksh) that will start a background process and also to be able to run another script.
The mntServer.ksh script contains:
#!/bin/ksh... (1 Reply)
I let a script A call script B.
I used
nohup a.sh &>/tmp/log &
In script A it calls B directly, without any redirecting or nohup or background.
However A is always "Stopped", while B is running correctly. Anybody knows why?
thanks!
-----Post Update-----
BTW, if I don't use nohup... (1 Reply)
I let a script A call script B.
I used
nohup a.sh &>/tmp/log &
In script A it calls B directly, without any redirecting or nohup or background.
However A is always "Stopped", while B is running correctly. Anybody knows why?
thanks!
-----Post Update-----
BTW, if I don't use nohup... (4 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 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 REDHAT
net::daemon::test
Net::Daemon::Test(3) User Contributed Perl Documentation Net::Daemon::Test(3)NAME
Net::Daemon::Test - support functions for testing Net::Daemon servers
SYNOPSIS
# This is the server, stored in the file "servertask".
#
# Create a subclass of Net::Daemon::Test, which in turn is
# a subclass of Net::Daemon
use Net::Daemon::Test ();
package MyDaemon;
@MyDaemon::ISA = qw(Net::Daemon::Test);
sub Run {
# Overwrite this and other methods, as you like.
}
my $self = Net::Daemon->new(\%attr, @options);
eval { $self->Bind() };
if ($@) {
die "Server cannot bind: $!";
}
eval { $self->Run() };
if ($@) {
die "Unexpected server termination: $@";
}
# This is the client, the real test script, note we call the
# "servertask" file below:
#
# Call the Child method to spawn a child. Don't forget to use
# the timeout option.
use Net::Daemon::Test ();
my($handle, $port) = eval {
Net::Daemon::Test->Child(5, # Number of subtests
'servertask', '--timeout', '20')
};
if ($@) {
print "not ok 1 $@
";
exit 0;
}
print "ok 1
";
# Real tests following here
...
# Terminate the server
$handle->Terminate();
DESCRIPTION
This module is a frame for creating test scripts of Net::Daemon based server packages, preferrably using Test::Harness, but that's your
choice.
A test consists of two parts: The client part and the server part. The test is executed by the child part which invokes the server part,
by spawning a child process and invoking an external Perl script. (Of course we woultn't need this external file with fork(), but that's
the best possibility to make the test scripts portable to Windows without requiring threads in the test script.)
The server part is a usual Net::Daemon application, for example a script like dbiproxy. The only difference is that it derives from
Net::Daemon::Test and not from Net::Daemon, the main difference is that the Bind method attempts to allocate a port automatically. Once a
port is allocated, the number is stored in the file "ndtest.prt".
After spawning the server process, the child will wait ten seconds (hopefully sufficient) for the creation of ndtest.prt.
AVAILABLE METHODS
Server part
Options Adds an option --timeout to Net::Daemon: The server's Run method will die after at most 20 seconds.
Bind (Instance method) This is mainly the default Bind method, but it attempts to find and allocate a free port in two ways: First of
all, it tries to call Bind with port 0, most systems will automatically choose a port in that case. If that seems to fail, ports
30000-30049 are tried. We hope, one of these will succeed. :-)
Run (Instance method) Overwrites the Net::Daemon's method by adding a timeout.
sub Run ($) {
my $self = shift;
$self->Run(); }
Client part
Child (Class method) Attempts to spawn a server process. The server process is expected to create the file 'ndtest.prt' with the port
number.
The method returns a process handle and a port number. The process handle offers a method Terminate that may later be used to stop
the server process.
AUTHOR AND COPYRIGHT
Net::Daemon is Copyright (C) 1998, Jochen Wiedmann
Am Eisteich 9
72555 Metzingen
Germany
Phone: +49 7123 14887
Email: joe@ispsoft.de
All rights reserved.
You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.
SEE ALSO Net::Daemon(3), Test::Harness(3)perl v5.12.1 2007-05-23 Net::Daemon::Test(3)