05-24-2017
Thanks for your help, primary I am trying to get is my current front connection via operating system, thats why i use netstat command.
Thanks for yourr help in advanced
10 More Discussions You Might Find Interesting
1. Programming
How to print current date of the Unix system accessing thru C++ program ?
I wrote like this
#include <time.h>
.......
time_t tt;
struct tm *tod;
....
time(&tt);
tod = localtime(&tt);
cout << tod->tm_mon + 1 << "/"
<< tod->tm_mday << "/"
... (6 Replies)
Discussion started by: ls1429
6 Replies
2. Shell Programming and Scripting
I need to get the current month -1 in string format, like Feb-2006. I am using k shell.
Any help is appreciated. (3 Replies)
Discussion started by: mogli4
3 Replies
3. UNIX for Dummies Questions & Answers
List,
I want to print the first line of my text file (say "me you"), preceded by the current date/time.
Something like (pseudo code):
awk '{print date,$1}'
I don't have a lot of awk knowledge (understatement), so forgive me if the answer is obvious... (3 Replies)
Discussion started by: philipz
3 Replies
4. Shell Programming and Scripting
Hi,
how can i print the previous, current and next line using sed?
current line is the matching line.
The following prints all lines containing 'Failure' and also the immediate next line
cat $file | sed -n -e '/Failure/{N;p;}'
Now, i also want to print the previous line too.
Thanks,... (8 Replies)
Discussion started by: ysrinu
8 Replies
5. SuSE
Hi,
As you can see by the title, I'm getting a "Caused by: java.io.IOException: open HTTP connection" error on a zLinux machine trying to run a java applet.
This same jar file works on a Windows machine. My previous version of the jar file worked on the zLinux machine.
I know this... (2 Replies)
Discussion started by: jla_8
2 Replies
6. UNIX for Dummies Questions & Answers
can anyone please suggest me on ideas to write a script which has to go back to 100 days from 'current date' and print the date of each day starting from 100th day to current day. (korn shell please)
Thanks
Pavan (5 Replies)
Discussion started by: pavan_test
5 Replies
7. UNIX for Dummies Questions & Answers
Hi guys,
I have found your forum super useful. However, right now I am stuck on a seemingly "simple" thing in AWK. I have two columns of data, the first column in Age (in million years) and the second column is Convergence Rate (in mm/yr).
I am trying to process my data so I can use it to... (2 Replies)
Discussion started by: awk_noob_456
2 Replies
8. Shell Programming and Scripting
Hi I have this code to print the current directory using Perl
use Cwd qw(abs_path);
my $path = abs_path($0);
print "$path\n";
But it is displaying my perl source code file along with the directory.
like this
C:\Perl\duration.pl
But I want it only to display this... (1 Reply)
Discussion started by: srijith
1 Replies
9. Shell Programming and Scripting
Dear All
I want below to compare two Consecutive line(i.e. current and next line). Based in that i need OP. Below is the IP file in that in i find "M" and if in next line i find "*" then i need both line in single line. If i dont find "*" in next line then i need to put commend "DOWN" .
I am... (4 Replies)
Discussion started by: jaydeep_sadaria
4 Replies
10. Shell Programming and Scripting
Heyas
I'm thinking about a new approach for my core display, basicly as it should make aligments easier.
Issue i'm currently facing, is tput cup capable of printing on the current line?
My best achievements were:
:) tui $ tput cup - 60;echo " ------ testing" ------ testing... (5 Replies)
Discussion started by: sea
5 Replies
LEARN ABOUT CENTOS
pmconnectlogger
PMCONNECTLOGGER(3) Library Functions Manual PMCONNECTLOGGER(3)
NAME
__pmConnectLogger - connect to a performance metrics logger control port
C SYNOPSIS
#include <pcp/pmapi.h>
#include <pcp/impl.h>
int __pmConnectLogger(const char *hostname, int pid);
cc ... -lpcp
DESCRIPTION
Each instance of the Performance Co-Pilot (PCP) archive logger program pmlogger(1) supports a control port on which __pmControlLog(3)
requests are received, and responses sent. Optionally, the pmlogger(1) instance may be designated the ``primary'' logger.
__pmConnectLogger may be used to establish a control port connection to the pmlogger(1) instance identified by process id pid on the host
hostname.
One special case is supported; for the reserved pid value of PM_LOG_CONTROL_PORT the requested connection is to the control port for the
``primary'' logger, whatever its process id might be.
On success, __pmConnectLogger returns a non-negative integer, that is a file descriptor that may be used in subsequent communication with
the pmlogger(1) instance, e.g. for __pmControlLog(3).
As the control port to pmlogger(1) is not mulitplexed, applications using __pmConnectLogger should use close(2) to terminate the connection
to pmlogger(1) as soon as they have finished communicating.
If the application connects, and the pmlogger(1) instance subsequently terminates, e.g. because the associated pmcd(1) instance is termi-
nated, the application will have to explicitly re-establish connection to a re-started pmlogger(1) instance by calling __pmConnectLogger
again.
SEE ALSO
pmcd(1), pmlc(1), pmlogger(1), PMAPI(3) and __pmControlLog(3).
DIAGNOSTICS
PM_ERR_PERMISSION
no permission to connect to the specified pmlogger(1) instance
-ECONNREFUSED
the designated pmlogger(1) instance does not exist
-EEADDRINUSE
the requested control port is already in use
Performance Co-Pilot PCP PMCONNECTLOGGER(3)