Sponsored Content
Top Forums Programming how to use ioctl to check out memory usage Post 97551 by Perderabo on Tuesday 31st of January 2006 12:30:22 PM
Old 01-31-2006
I got:
143> /opt/SUNWspro/bin/CC proc.c -o proc
144> ./proc
pid:15832 init memory:1208320
pid:15832 after memory:135426048

Try opening "/proc/self" which is how everyone else does it. But getting your own pid should work too. Check the error codes after each system call. That will give you a clue.
 

10 More Discussions You Might Find Interesting

1. Programming

Monitor CPU usage and Memory Usage

how can i monitor usages of CPU, Memory, Hard disk etc. under SUN Solaries through a c program or java program i want to store that data into database so i can show it graphically thanks in advance (2 Replies)
Discussion started by: Gajanad Bihani
2 Replies

2. HP-UX

how can I find cpu usage memory usage swap usage and logical volume usage

how can I find cpu usage memory usage swap usage and I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times my final destination is monitor process logical volume usage above X % and number of Logical voluage above can I not to... (3 Replies)
Discussion started by: alert0919
3 Replies

3. Solaris

current CPU usage, memory usage, disk I/O oid(snmp)

Hi, I want to monitor the current cpu usage, monitor usage , disk I/o and network utlization for solaris using SNMP. I want the oids for above tasks. can you please tell me that Thank you (2 Replies)
Discussion started by: S_venkatesh
2 Replies

4. AIX

How to monitor the IBM AIX server for I/O usage,memory usage,CPU usage,network..?

How to monitor the IBM AIX server for I/O usage, memory usage, CPU usage, network usage, storage usage? (3 Replies)
Discussion started by: laknar
3 Replies

5. UNIX for Dummies Questions & Answers

Command to display the space usage (memory usage) of a specific directory.

Hi all, Can you please tell me the command, with which one can know the amount of space a specific directory has used. df -k . ---> Displays, the amount of space allocated, and used for a directory. du -k <dir name> - gives me the memory used of all the files inside <dir> But i... (2 Replies)
Discussion started by: abhisheksunkari
2 Replies

6. Linux

how to check memory usage ?

hello, I have purchased VPS from one webhosting company. VPS comes with Virtuozzo power panel. It has 512MB gurranted RAM and dynamic RAM 2048 MB. I have hosted single domain with 50MB database and wordpress installation. But I am getting resource alerts. It goes sometime in yellow... (8 Replies)
Discussion started by: mrugesh78
8 Replies

7. AIX

Script to check the memory usage in AIX

Hello Everyone, I'm looking for a efficient script that monitors the memory usage on AIX and send email alerts when it reaches certain point. Q) need to get alerts, when the memory usage exceed 90% on AIX? or Q) Need to get alerts when available free Memory is 1G or 10% etc Any idea... (3 Replies)
Discussion started by: System Admin 77
3 Replies

8. UNIX for Dummies Questions & Answers

Memory usage per user,percent usage,sytem time in ksh

Let's say i have 20 users logged on Server. How can I know how much memory percent used each of them is using with system time in each user? (2 Replies)
Discussion started by: roy1912
2 Replies

9. Solaris

Memory Usage check

Hello Friends, I need to check memory usage & availability before I could run a program if there is enough memory is left or not, so how could i achieve this? Which command output i should rely on? I have diplayed outputs of SAR, VMstat and PRstat commands below, But how could i check memory... (8 Replies)
Discussion started by: EAGL€
8 Replies

10. UNIX for Beginners Questions & Answers

How can I check actual memory usage each Process?

I can't check actual memory usage in the Redhat 5.5... The used memory is 14214 Mb of Total 15919 by Free -m command. I sum the RSS value on PS aux command result and the value is 5428.66Mb. Yes It's quite different actual usage memory and RSS value. So I added Shared memory value... (5 Replies)
Discussion started by: tom8254
5 Replies
ln(4)							     Kernel Interfaces Manual							     ln(4)

Name
       ln - Lance Ethernet interface

Syntax
       device ln0 at ibus? vector lnintr

Description
       The interface provides access to a 10 Mb/s Ethernet network through the Lance controller.

       The  host's  Internet  address  is specified at boot time with an SIOCSIFADDR ioctl.  The interface employs the address resolution protocol
       described in to map dynamically between Internet and Ethernet addresses on the local network.

       The interface normally tries to use a trailer encapsulation to minimize copying data on input and output.  This	can  be  disabled  for	an
       interface by setting the IFF_NOTRAILERS flag with an SIOCSIFFLAGS ioctl.  Trailers are only used for packets destined for Internet hosts.

       The  SIOCSPHYSADDR ioctl can be used to change the physical address of the Lance.  The SIOCRPHYSADDR ioctl can be used to read the physical
       address of the Lance.

       The SIOCADDMULTI and SIOCDELMULTI ioctls can be used to add or delete multicast addresses.  The Lance recognizes a maximum of 12  multicast
       addresses.

       The  SIOCRDCTRS	and  SIOCRDZCTRS ioctls can be used to read or ``read and clear'' the Ethernet driver counters.  The argument to these two
       ioctls is a pointer to a counter structure, found in

       The SIOCENABLBACK and SIOCDISABLBACK ioctls can be used to enable and disable the interface loopback mode respectively.

Diagnostics
       The diagnostic error messages contain relevant information provided by the Lance.

       ln%d: can't handle af%d
       The interface was handed a message with addresses formated in an unsuitable address family, and the packet was dropped.

       ln%d: memory error (MERR)
       A memory parity error has occurred.

       ln%d: lnalloc: cannot alloc memory ...
       The driver was unable to allocate memory for internal data structures.

       ln%d: initialization error
       The driver was unable to initialize the network interface.

       ln%d: SIOCADDMULTI fail, multicast list full
       Too many multicast requests have been made.

See Also
       arp(4p), inet(4f), intro(4n)

																	     ln(4)
All times are GMT -4. The time now is 07:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy