f



sys/processor.h sys/loadavg.h in linux?

I have a program I wrote for Solaris.  I am trying to port the program to linux. 
  One of the problems I am having is attaining hardware information on the machine.

Using sys/processor.h on solaris, I am able to num cpu's and clock speed.
Using sys/loadavg.h, I am able to get the load avg u/s/i.
I can still get mem, and free mem from sysconf, that is ok.

I would rather not parse through /proc/cpuinfo!

TIA,

~S
0
Shea
2/14/2004 11:06:01 PM
comp.unix.programmer 10848 articles. 0 followers. kokososo56 (350) is leader. Post Follow

0 Replies
2371 Views

Similar Articles

[PageSpeed] 38

Reply:

Similar Artilces:

missing include files (sys/param.h, sys/socket.h, net/if.h, ...)
Hi I'm using VC++ 6.0 SP5 under windows 2k. I tried to compile the net-snmp (sourceforge.net) source. When I try to compile, I get the following errors (missings): Cannot open include file: 'sys/param.h' Cannot open include file: 'sys/socket.h' Cannot open include file: 'net/if.h' Can somebody help me? "Ronald Meier" <meier1@hta-bi.bfh.ch> wrote in message news:bn5atd$bg6$1@rex.ip-plus.net... > I'm using VC++ 6.0 SP5 under windows 2k. I tried to compile the net-snmp > (sourceforge.net) source. > When I try to com...

missing include files (sys/param.h, sys/socket.h, net/if.h, ...)
Hi I'm using VC++ 6.0 SP5 under windows 2k. I tried to compile the net-snmp (sourceforge.net) source. When I try to compile, I get the following errors (missings): Cannot open include file: 'sys/param.h' Cannot open include file: 'sys/socket.h' Cannot open include file: 'net/if.h' Can somebody help me? Thanks Ronald Meier wrote: > Hi > > I'm using VC++ 6.0 SP5 under windows 2k. I tried to compile the net-snmp > (sourceforge.net) source. > When I try to compile, I get the following errors (missings): > > Cannot open include file: ...

redhat 8
hi, i'm running redhat 8 and cannot find the two OS include files sys/dkio.h and sys/dklabel.h. nor can i find references in internet groups that anyone else has this problem. any ideas why this doesn't not come standard with redhat dist, or why i seem to be the only one with this problem (this seems strange to me). and most importantly, where the best place to download this from? thanks in advance, richard boaz On Thu, 02 Sep 2004 10:52:13 +0200, richard wrote: > i'm running redhat 8 and cannot find the two OS include files sys/dkio.h > and sys/dklabel.h. If I r...

<sys/types.h> and <linux/types.h>
Hello All, As I understand it, the inclusion, via an #include directive, of a Linux kernel header in a userland code, is best avoided. I am seeing the following error output if the <sys/types.h> header is included: In file included from /usr/include/linux/rtnetlink.h:4, from linux.h:59, from linux.c:54: /usr/include/linux/netlink.h:22: error: Syntax error before "__u32" /usr/include/linux/netlink.h:28: error: Syntax error before "__u32" /usr/include/linux/netlink.h:30: error: Syntax error before "nlmsg_flags" /usr/include/linux/netlin...

error when compiling source that include sys/msg.h and linux/msg.h
Hi newsgroup, I need to do some ipc with message queues and want to know the max message size. I understand this information is in MSGMAX located in <linux/msg.h> But if add this line to my source the compiler bothers about redefiniting some ipc structs... What am I doing wrong here? Greetings from Germany Johannes Below are some information about my system and some test code... OS: Debian GNU/Linux 4.0 Kernel: Linux devel3 2.6.18-xen-3.1-2-686 #1 SMP Mon Jun 16 17:34:13 CEST 2008 i686 GNU/Linux Compiler: gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21...

Windows Screws Up UNIX and Linux by De^H^H^H^HGN
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Windows Newlines Will Kill Your Linux Scripts ,----[ Quote ] | What’s going on is that you really do have a | fatal error in your code, and it’s an error | that you can’t see. In fact, it’s invisible. | The error is that you have uploaded a file that | you created on a Windows machine. `---- http://hackingthevalley.com/2011/06/21/windows-newlines-will-kill-your-linux-scripts/ Cancer in your shell, cancer on the Web... -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAk4DDfQACgkQU4xAY3RXLo48cACdGI9aRcuc3vaJfmS+pp4...

Difference between <linux/msg.h> and <sys/msg.h>
Hi, I wanna know the difference between /usr/include/linux/msg.h and /usr/include/sys/msg.h. Actually, if i put <sys/msg.h> as my header file the code does't compile and the reason is the "struct msqid" structure is different than solaris. It doesn't have "struct msg msg_first" structure in it, where as /usr/include/linux/msg.h has that. So, where should i use <linux/msg.h> and where <sys/msg.h> ???? Thanx in advance rgds abhi ...

/include/signal.h and /include/sys/types.h
In /include/signal.h Line:00758 00758 typedef void (* __sighandler_t) (int); what does this function pointer do? or how to use it ? what is the real type of the __sighandler_t ?Only a function name? But if _POSIX_SOURCE is not defined,how could it be used as below: 00762 #define SIG_ERR ((__sighandler_t) -1) In /include/sys/types.h Line:01720 Line:01722 01720 typedef void (*sighandler_t) (int); 01720 typedef void (*sighandler_t) (); If _ANSI is not defined,the type sighandler_t is still used,but i cannot find the definition of it.What is the real type of it? (If _POSIX_SOURCE is de...

sys/io.h vs asm/io.h
what is the difference between sys/io.h and asm/io.h? or maybe the better question would be if you're doing low-level hardware i/o, is there a reason to use sys/io.h? ...

linux/tqueue.h and linux/iobuf.h
Hi there, I am trying to port a driver from 2.4 to 2.6. The driver uses linux/tqueue.h and linux/iobuf.h in 2.4. The header files do not exist in the includes for 2.6. Could someone please direct me to what changes need to be made to the driver header includes to make it work for 2.6? I am newbie when it comes to porting drivers to 2.6, so any help would be appreciated. Delete Reply Forward Spam ...

sys/socket.h & netdb.h No such file or directory
I installed djgpp on my ms-dos machine and its ok when running hello world or some kernel sources but i couldn't compile client server programs 'cause they need to include sys/socket.h and other networking libraries. i dwonloaded all the zip files come with the package but still it gives me this error. how can i compile these programs. in fact i have compiled and run my code with gcc under linux...:( smarto59@hotmail.com wrote: > I installed djgpp on my ms-dos machine and its ok when running hello > world > or some kernel sources but i couldn't compile client server prog...

Difference between "sys/sem.h" and "semaphore.h"
Hi All, I got confused with those sem APIs in these two header files. What are the differences between them? e.g. sem_init V.S. sem_get? How are we supposed to select in between them when we need a semaphore? Thanks! david <wuxianming@gmail.com> wrote: > I got confused with those sem APIs in these two header files. What are > the differences between them? e.g. sem_init V.S. sem_get? How are we > supposed to select in between them when we need a semaphore? There are two implementations of semaphores, traditional SystemV semaphores and the newer POSIX semaphores...

including sys/ioctl.h with gcc 3.x under Redhat Linux 9 ?
I am trying to convert an app from C to C++ on a RedHat Linux 9 system. This C app uses the "ioctl" function from sys/ioctl.h. Now, I need to explicitly include ssys/ioctl.h in the C++ app, though gcc finds it just fine for the C application. UNFORTUNATELY, the second I include this file, I get a stream of errors indicating that gcc does not accept the file format of the ioctl.h. Is there something special I have to do to use ioctl.h in C++? I would be very grateful for any help. Thank you, Laszlo Szijarto [ See http://www.gotw.ca/resources/clcm.htm for info about ] ...

mshtml.h mshtmlc.h dimm.h dispex.h added
New version features those files. Many others missing? Just send me a list 0YfQtdGC0LLQtdGA0LMsIDEzINGB0LXQvdGC0Y/QsdGA0Y8gMjAxMsKg0LMuLCAyMjozMToxMyBV VEMrNCDQv9C+0LvRjNC30L7QstCw0YLQtdC70YwgamFjb2IgbmF2aWEg0L3QsNC/0LjRgdCw0Ls6 DQo+IE5ldyB2ZXJzaW9uIGZlYXR1cmVzIHRob3NlIGZpbGVzLiBNYW55IG90aGVycyBtaXNzaW5n PyBKdXN0IHNlbmQgbWUgYSBsaXN0DQoNCmlzIHdiZW1pZGwuaCBhZGRlZCB0b28/ ...

sys/select.h
Hi I have problem with compilation freeradius,sys/select.h not found, where I can find sys/select.h on HP-UX 11.00 or HP-UX 11.11? Thanks for info. Slawek yazooPL <yazoo@hacking.pl> wrote: > I have problem with compilation freeradius,sys/select.h not found, > where I can find sys/select.h on HP-UX 11.00 or HP-UX 11.11? Thanks > for info. There is no sys/select.h under HP-UX 11.11 and I doubt under 11.00. The file one includes is sys/time.h per the select() manpage. select(2) select(2) NAME select - synchronous I/O mu...

sys/queue.h
I am looking for some documentation on using #include <sys/queue.h> Has anybody ever used it? I would like to integrate a linked list using it. I am writing a packet sniffer and am using a packetCache structure to hold captured packets for exporting purposes and data collection. well here is the code <code> /* * Copyright (c) 2007 HydraResearch. All rights reserved. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundatio...

/sys/proc.h
Hello everyone, I'm trying to use the functions of proc.h header file, but when I going to compile this code, I get "undefined symbol" for pid_entry() and prfind() functions. anyone can say me what is the library that I have to include on gcc command line when compiling?! Thanks in advance, JR "jrribeiro" <aguimarjr@gmail.com> writes: >I'm trying to use the functions of proc.h header file, but when I >going to compile this code, I get "undefined symbol" for pid_entry() >and prfind() functions. They're kernel functions; you cannot use them in programs. Casper -- Expressed in this posting are my opinions. They are in no way related to opinions held by my employer, Sun Microsystems. Statements on Sun products included here are not gospel and may be fiction rather than truth. So, are there another option to get process' information instead read / proc directory? I'm with another problem too, another option I would have use the kvm library, but kvm_open() always returns NULL. Do you know what do I have to do? Thanks. JR On Feb 9, 11:22 am, Casper H.S. Dik <Casper....@Sun.COM> wrote: > "jrribeiro" <aguima...@gmail.com> writes: > >I'm trying to use the functions of proc.h header file, but when I > >going to compile this code, I get "undefined symbol" for pid_entry() > >and prfind() functions. > > They're kernel functions; you cannot use th...

sys/pool.h
Hi all, i'm trying to compile arts on my panther but it breaks beacause i haven't sys/pool.h. What does it do ? How can i give one sys/pool.h ? (i'm a bit frustrated after hours of qt compilation :-( ) -- Fabio ...

sys/mount.h
Hi! I want to compile a linux project in djgpp. it needs sys/mount.h It is possible to compile it under dos? thx, flo ...

[News] EDB Chooses GNU/Linux, EDS Swallowed by H-P, H-P's Linux CTO Speaks
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 EDB Implements Red Hat Solutions for the Reliability of In-House Mainframe Computing ,----[ Quote ] | “There are clear advantages to mainframe computing including high | reliability, security and resource savings in the amount of energy and | cooling capacity used to run an application,” said Helge Forberg, section | chief for Application, Automation and Support Systems at EDB Business | Partner. `---- http://www.businesswire.com/portal/site/google/?ndmViewId=news_view&newsId=20080514005111&newsLang=en HP buys EDS: You fools! Yo...

sys/ioctl.h turned off?
Line 132 of sys/ioctl.h: #if 0 My experience is that this turns everything else bellow off. Why? Dozens of declaraions disabled... Why? Changed to #if defined (__ENABLE_IOCTL) to suit my purposes. Ben > My experience is that this turns everything else bellow off. Why? > Dozens of declaraions disabled... Why? Because we don't support them in the library. "Richard Dawe" <rich@phekda.freeserve.co.uk> wrote in message news:3F2BD9E7.DB0F3B54@phekda.freeserve.co.uk... > Hello. > > bdeck wrote: > > > > Line 132 of sys/ioctl.h: > > > &...

What are files Z80.SYS, Z80CCP.SYS and PRMTVPVT.SYS for?
Had a good Christmas this weekend? I came across diskettes with "Mailmerge 3.0 and Calcstar version 1.45 for CP/M 8080", that seem to be for a Dec Rainbow machine. Besides a Mailmerge overlay and the Calcstar files, some CP/M and some CP/M-86 files, there are three files on the diskettes that I never have heard of before: Z80.SYS, Z80CCP.SYS and PRMTVPVT.SYS. There are no ASCII texts in PRMTVPVT.SYS. The only ASCII text in Z80.SYS (at the end of the file) is "EI SPHLDI XCHGPCHLXTHLRET HLT CMC STC CMA DAA RAR RAL RRC RLC NOP CPI ORI XRI ANI SBI IN SUI OUT ACI ADI CALLJMP LDA...

Where's Wally ^H^H^H Tholen?
Oh, look! I've found Dickless Davie - http://www.livejournal.com/users/krautboy/243291.html He's with all his saucerhead friends. Half way down, still missing his penis. It even looks like him. And with all the fat chicks there, one of them has to be Sheila AKA Nightingale. Michael Baldwin Bruce wrote: > Oh, look! I've found Dickless Davie - > > http://www.livejournal.com/users/krautboy/243291.html > > He's with all his saucerhead friends. Half way down, still missing his > penis. It even looks like him. LOL! And the next geek down must be Dick. > ...

Kernel Compilation Problem
Hi, I have SBC 104+ with installed White Dwarf Linux on it. I have installed all dev_tools properly as mentioned on site. I had written a simple Kernel init & cleanup module for device driver. My code is as follows: ----------------------------------------------------------------- #include <linux/kernel.h> #include <linux/module.h> int init_module(void) { printk(" Kernel Speaking...."); return 0; } void cleanup_module(void) { printk(" Kernel Gudbye...."); } ------------------------------------------------------...

Web resources about - sys/processor.h sys/loadavg.h in linux? - comp.unix.programmer

Processor - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Tesla hires the guy who pioneered Apple A-series processor line
From Electrek : We’ve learned that Tesla this month quietly hired high-profile microprocessor engineer Jim Keller as Vice President of Autopilot ...

Price Check: Intel’s Unlocked Skylake Processors for Desktops Are Getting More Affordable
Due to unprecedented demand, Intel’s latest Skylake processors with unlocked multiplier were significantly overpriced late last year . However, ...

ARM unveils 4K capable Mali-DP650 mobile display processor
Displays have been one of the fastest moving pieces of mobile technology in the past few years, quickly leaping up from HD to QHDs resolution ...

Apple captured 21% of smartphone processors, 31% of tablet CPUs in 2015
Although the smartphone and tablet processor markets actually declined year-over-year in 2015, Apple managed to capture large shares of both ...

Is D-Wave’s quantum processor really 10⁸ times faster than a normal computer?
One of D-Wave's chips, circa 2011. (credit: D-Wave) We have been following D-Wave's claims about its quantum hardware at Ars for a number of ...

AMD Zen processors will have 32 cores and Symmetrical Multi-Threading
We seem to have hit something of a ceiling when it comes to the raw speed of processors; things are now progressing rather more slowing than ...

Apple has reportedly decided who will make the iPhone 7's processor — and Samsung is losing out
Apple has chosen who will make the iPhone 7's processor and it isn't Samsung, according to The Electronic Times . The Taiwan Semiconductor Manufacturing ...

Credit Card Processor For Work-At-Home Scam Companies Settles FTC Charges
When you respond to an ad promising untold wealth if you start an at-home business, someone in a call center will contact you and try to extract ...

How Intel’s Skylake processors will supercharge your Mac
Here’s what makes those Skylake processors so special, and how they’re going to bring greater performance, graphics, and battery life to your ...

Resources last updated: 2/17/2016 10:49:44 AM