11-26-2013
/proc in solaris does not equal /proc in linux. The proc files are mostly not the same names and if by accident something has the same variable name its semantics are going to be different. You will have to recode. Period.
What information does your code currently get? There is probably a different way to get it in linux. 'The Linux programming interaface' by M Kerrisk is you best bet. If you post back here asking 'How do I get so-and-so in Linux? ' you will get an answer.
10 More Discussions You Might Find Interesting
1. Programming
Hi,
I am trying to get a the process cpu usage from the /proc file recently, on the Solaris 5.10. But met some rookie issue which i need some help. for below program, compiler complains that pstatus_t is undefined, although both type are defined in the procfs.h.
#include <sys/procfs.h>... (4 Replies)
Discussion started by: sleepy_11
4 Replies
2. UNIX for Dummies Questions & Answers
if test -z "$1"
then echo "you must give a filename or filepath"
else path=`dirname $1`
f_name =`basename $1`
if path="."
then path=`pwd`
fi
fi
cat $f_name $path >> index.txt
The only problem I am encountering with this is writing $path to index.txt
Keeps going gaga:
cat:... (1 Reply)
Discussion started by: Vintage_hegoog
1 Replies
3. UNIX for Advanced & Expert Users
I need to convert a password protected excel file which will be in UNIX server to a comma separated file. For this I need to open the excel file in UNIX box but the UNIX box doesn't prompt for password instead it is opened in an encrypted manner.
I could manually ftp the excel file to local... (2 Replies)
Discussion started by: Devivish
2 Replies
4. Shell Programming and Scripting
Hi all...
I have a text file which i want to move to some remote directory...
when i use command prompt to ftp that textfile,.. after ftp if i check the file by using vi i can see many ^M with the starting and end of each line...
instead if i use grab and drop method to copy that... (5 Replies)
Discussion started by: smarty86
5 Replies
5. Shell Programming and Scripting
Hi,
I have written a bash shell script. In order to create a log file when I run the script, as well as print the output to the terminal, I call it in the following manner:
my_shell_script 2>&1 | tee my_log_fileThis seems to work well. However, I have put some statements in the script to... (2 Replies)
Discussion started by: msb65
2 Replies
6. Shell Programming and Scripting
Hi,
I would like to ask if someone know how to test a files if exist the file is a nfs mount ufsdump archive file..
i used the test operator -f -a h almost all test operator but i failed
file1=ufs_root_image.dump
|| echo "files doesn't exist && exit 1
the false file1 is working but... (0 Replies)
Discussion started by: jao_madn
0 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I have a file on Sunos with permissions:
-rw-r--r--
When I 'more' it...I get the message:
*** filename: directory ***
And it is acutally a directory. How come there is no 'd' shpwing on the file permission settings?
Thanks (2 Replies)
Discussion started by: Grueben
2 Replies
8. UNIX for Advanced & Expert Users
Hi All
I can't get my head around a problem I have with a control file.
The file is to control a "Listener" of sorts that listens on a named pipe. A script kicks off the listener in the background and passes it a control file. In the file it sets the Status field to pending. It then waits... (3 Replies)
Discussion started by: steadyonabix
3 Replies
9. Shell Programming and Scripting
Dear All,
this is my first post on this Forum, glad to be here.
I'm trying to fix an .ods file. Yes, I had a backup, but it's also corrupted.
When opening the document I get this EM:
read error
format error discovered in the file in sub-document content.xml at
2,337040(row,col).
So I... (3 Replies)
Discussion started by: jameslast
3 Replies
10. Linux
Hello forum memebers,
I have blocking with the issue about procfs.h while proting code from solaris to linux. so pleas let me know any difference between solaris and linux.
Thanks
kshyap (1 Reply)
Discussion started by: kshyap
1 Replies
LEARN ABOUT DEBIAN
sys::statistics::linux::sockstats
Sys::Statistics::Linux::SockStats(3pm) User Contributed Perl Documentation Sys::Statistics::Linux::SockStats(3pm)
NAME
Sys::Statistics::Linux::SockStats - Collect linux socket statistics.
SYNOPSIS
use Sys::Statistics::Linux::SockStats;
my $lxs = Sys::Statistics::Linux::SockStats->new;
my $stat = $lxs->get;
DESCRIPTION
Sys::Statistics::Linux::SockStats gathers socket statistics from the virtual /proc filesystem (procfs).
For more information read the documentation of the front-end module Sys::Statistics::Linux.
SOCKET STATISTICS
Generated by /proc/net/sockstat.
used - Total number of used sockets.
tcp - Number of tcp sockets in use.
udp - Number of udp sockets in use.
raw - Number of raw sockets in use.
ipfrag - Number of ip fragments in use (only available by kernels > 2.2).
METHODS
new()
Call "new()" to create a new object.
my $lxs = Sys::Statistics::Linux::SockStats->new;
It's possible to set the path to the proc filesystem.
Sys::Statistics::Linux::SockStats->new(
files => {
# This is the default
path => '/proc',
sockstat => 'net/sockstat',
}
);
get()
Call "get()" to get the statistics. "get()" returns the statistics as a hash reference.
my $stat = $lxs->get;
EXPORTS
No exports.
SEE ALSO
proc(5)
REPORTING BUGS
Please report all bugs to <jschulz.cpan(at)bloonix.de>.
AUTHOR
Jonny Schulz <jschulz.cpan(at)bloonix.de>.
COPYRIGHT
Copyright (c) 2006, 2007 by Jonny Schulz. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2012-03-09 Sys::Statistics::Linux::SockStats(3pm)