Problem with procfs.h file


 
Thread Tools Search this Thread
Operating Systems Linux Problem with procfs.h file
# 1  
Old 11-26-2013
Problem with procfs.h file

hello Forum members.

please find the below iisue and help me to solve the issue.


The below variable is declared in the procfs.h and applications has succuessful running on solaris but,as part of my work i am porting the entire application on linux. the only issue remained is below one.
error:'psinfo_t' was not declared in this scope

the procfs.h is OS depenedent.


Thanks in Advance
Kshyap
# 2  
Old 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.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Linux

Procfs.h is in Solaris as same in 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

2. Shell Programming and Scripting

Xmllint - Xml-file problem --ods file not opening

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

3. UNIX for Advanced & Expert Users

File copy problem?

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

4. UNIX for Dummies Questions & Answers

File with -rw-r--r-- problem

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

5. Shell Programming and Scripting

Problem in test file operator on a ufsdump archive file mount nfs

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

6. Shell Programming and Scripting

Problem with Log File

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

7. Shell Programming and Scripting

Problem with my file...

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

8. UNIX for Advanced & Expert Users

Problem in converting password protected excel file to csv file in unix

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

9. UNIX for Dummies Questions & Answers

Problem writing file path to txt file

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

10. Programming

compiler can't find pstatus_t even procfs.h inlcuded

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
Login or Register to Ask a Question