Is this the portion I add ESSSVR or is this just getting all processes then it find the pattern later?
PID_REGEX_PATTERN="^\s*("
No. I'm grepping the process list for multiple PIDs that may match the given pattern.
For normal use, you may just change the very last line of the script:
If you like to tweak the script, the most liked improvement will be to do not wait the full 30 second period if the process is already terminated.
I recommend you to test the script in a testing environment before using it in production, since you do not know anything about my environment and vice versa for me.
just like what the subject said
but the ip is different
example
if now my IP is 192.168.0.50 and my name is seed
if i wanna terminate 192.168.0.55 with the same nick of mine, seed
can i do that ?? and what is the command ?? (2 Replies)
Hi,
I'm trying to make a script that reads the console input and terminates with CTRL+D. It's absolutely basic but I don't know how to "read" the CTRL+D. I've tried a bunch of things like
EOT=^D
while //with & without quotations
do
read input
echo $input
done
while
while ]
... (12 Replies)
Hi
I was working on a shell script with randomly shows a page of text from a randomly selected topic .As soon as the page is displayed it callers a timer script which keeps on running indefinitely until the timer script is killed by the user.
This is where I have the problem,if I press... (2 Replies)
I now that this isnt the greatest code around. Im a network guy by trade not a programer .. but needed something to compare config files ...
Anyway ... intermittently, the program terminates.
Ive been looking at the code for a week trying to figure it out and Im stumped. Can anyone provide... (0 Replies)
hi all,
i m running few batch process through shell script using nohup command but when session get terminated(due to network, reboot of desktop and closing session directly) all processes terminating abnormally and core file is generating.
application batch process is connecting oracle... (4 Replies)
Hi all , i know i ask a lot of question but these are really hard to solve and important question. I send two scripts:
expect.sh:
#!/usr/local/bin/expect
spawn ssh root@172.30.64.163
expect "login:"
send "root\n"
expect "password:"
send "root\n^M"
interact
and
son.sh:
... (2 Replies)
Hi,
Since I staterd working as Unix sysadmin (about 3 years ago) I always used to trigger a process evaluating the conditions needed to this process to be executed. Recently I've change the company where I work, and they usually create a trigger file to start a process or to stop a process while... (1 Reply)
Hi All,
I am trying to make a small shell script.In this it will got directory as per variable & run the find command on that directory.There are 120 + directories & not sure all of them are mounted.So the issue is if the directory doesent exists my loops gets terminated. so is there any was... (3 Replies)
Can any help me in finding the way to close opened file descriptor in Solaris ,without killing process. As accidently a file was removed which was opened by a process.
Much thanks in advance :) (11 Replies)
Discussion started by: nitj
11 Replies
LEARN ABOUT PHP
stomp_read_frame
STOMP_READ_FRAME(3) 1 STOMP_READ_FRAME(3)Stomp::readFrame - Reads the next frame
Object oriented style (method):
SYNOPSIS
public stompframe Stomp::readFrame ([string $class_name = "stompFrame"])
DESCRIPTION
Procedural style:
array stomp_read_frame (resource $link)
Reads the next frame. It is possible to instantiate an object of a specific class, and pass parameters to that class's constructor.
PARAMETERS
o $link
-Procedural style only: The stomp link identifier returned by stomp_connect(3).
o $class_name
- The name of the class to instantiate. If not specified, a stompFrame object is returned.
RETURN VALUES
Note
A transaction header may be specified, indicating that the message acknowledgment should be part of the named transaction.
CHANGELOG
+------------+----------------------------------+
| Version | |
| | |
| | Description |
| | |
+------------+----------------------------------+
|Stomp 0.4.0 | |
| | |
| | $class_name parameter was added. |
| | |
+------------+----------------------------------+
EXAMPLES
Example #1
Object oriented style
<?php
/* connection */
try {
$stomp = new Stomp('tcp://localhost:61613');
} catch(StompException $e) {
die('Connection failed: ' . $e->getMessage());
}
/* subscribe to messages from the queue 'foo' */
$stomp->subscribe('/queue/foo');
/* read a frame */
var_dump($stomp->readFrame());
/* close connection */
unset($stomp);
?>
The above example will output something similar to:
object(StompFrame)#2(3) {
["command"]=>
string(7) "MESSAGE"
["headers"]=>
array(5) {
["message-id"]=>
string(41) "ID:php.net-55293-1257226743606-4:2:-1:1:1"
["destination"]=>
string(10) "/queue/foo"
["timestamp"]=>
string(13) "1257226805828"
["expires"]=>
string(1) "0"
["priority"]=>
string(1) "0"
}
["body"]=>
string(3) "bar"
}
Example #2
Procedural style
<?php
/* connection */
$link = stomp_connect('ssl://localhost:61612');
/* check connection */
if (!$link) {
die('Connection failed: ' . stomp_connect_error());
}
/* subscribe to messages from the queue 'foo' */
stomp_subscribe($link, '/queue/foo');
/* read a frame */
$frame = stomp_read_frame($link);
/* close connection */
stomp_close($link);
?>
The above example will output something similar to:
array(3) {
["command"]=>
string(7) "MESSAGE"
["body"]=>
string(3) "bar"
["headers"]=>
array(6) {
["transaction"]=>
string(2) "t1"
["message-id"]=>
string(41) "ID:php.net-55293-1257226743606-4:3:-1:1:1"
["destination"]=>
string(10) "/queue/foo"
["timestamp"]=>
string(13) "1257227037059"
["expires"]=>
string(1) "0"
["priority"]=>
string(1) "0"
}
}
PHP Documentation Group STOMP_READ_FRAME(3)