The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Special Forums > Hardware > Filesystems, Disks and Memory
.
google unix.com



Filesystems, Disks and Memory Discuss NAS, SAN, RAID, Robotic Libraries, backup devices, RAM, DRAM, SCSI, IDE, EIDE topics here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to find Total and Free Physical Memory and Logical Memory in SOLARIS 9 0ktalmagik SUN Solaris 4 02-03-2009 09:37 AM
How to check free/total Memory in AIX vimalbhan AIX 6 01-16-2008 09:34 PM
how can i get The total size of the process in virtual memory om GB or MB umen UNIX for Dummies Questions & Answers 1 02-21-2007 07:43 AM
Easy one : command listing total memory beginer HP-UX 4 05-31-2006 08:22 AM
swap memory sivaramat SUN Solaris 6 12-29-2003 10:59 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-29-2002
ghe1 ghe1 is offline
Registered User
  
 

Join Date: Mar 2002
Posts: 3
Total Memory/Swap Memory

I need to put a program together to determine the total, available memory and total and available swap on unix machines. I have been searching for weeks and I seem to run into dead ends. Every unix platform I look at has a different way to determine memory info.


Any sugggestions or new directions would be greatly appreciated.

THANKS!!!!!
  #2 (permalink)  
Old 03-29-2002
Kelam_Magnus's Avatar
Kelam_Magnus Kelam_Magnus is offline Forum Advisor  
Registered User
  
 

Join Date: Aug 2001
Location: DFW McKinney, TX,
Posts: 1,069
obvious homework scenario!

I might be wrong but I don't think so. (Brand new user, 1st post is a generic problem question)

No one here will write your script for you, but we may offer advices if this is an "honest" question and/or not a homework question.

When you post you must tell us a little about your UNIX Version.

What is the OS version. shells used etc...

Many systems have commands like swapinfo, meminfo. You can also look in /var/adm/messages on some boxes. Some systems have a "dmesg" command that will show you some stuff.

You can grep info out of the kernel config with the "strings" command.

Get a few good books like UNIX in a Nutshell by O'Reilly.
Here is a link to another newbie response that I posted.

Beginner Advice?

If this is not homework, I apologize for my sharp comment. Read the FAQs on the homepage to understand the rules of this forum
  #3 (permalink)  
Old 03-29-2002
ghe1 ghe1 is offline
Registered User
  
 

Join Date: Mar 2002
Posts: 3
Here's the deal: I have already put together a script that runs on a linux environment 32-bit machine, but it does not work on an IRIX or SUN or Tru64, so I was wondering if there was something universal for all unix machines. I am quite familar with "vmstat", "swap -l", "swapon -s", but I need an executable and not command line code. As to what OS and shells used, I need to be able to cover them all. This function needs to cover a wide range of machines.

I also already have the "Unix in a Nutshell," by O'Reilly. I use it faithfully.

I will check /var/adm/messages..."dmesg." Haven't tried that yet, its worth a shot.
  #4 (permalink)  
Old 04-01-2002
Kelam_Magnus's Avatar
Kelam_Magnus Kelam_Magnus is offline Forum Advisor  
Registered User
  
 

Join Date: Aug 2001
Location: DFW McKinney, TX,
Posts: 1,069
search "bin directories"

If you are looking for generic commands of this type, there are none. All of the major brands of UNIX are "proprietary" that means that they have altered UNIX just enough to make "their own". And this is the case with swap and memory.

Tru64 has a command "meminfo". HP does not. HP has a command "swapinfo" and I am sure that Tru64 doesn't. You will need to look in the "bin directories"

/bin
/sbin
/usr/bin
/usr/sbin
/usr/local/bin

Please see my response in this post.
A Quick Question


As a result, a few commands are unique to each flavor of UNIX.

Most flavors of unix are quite similar, all major brands have the generic backup tools like tar, cpio & dd.

You will also find that there are some filesystem differences as well as device configuration and naming conventions.
  #5 (permalink)  
Old 04-01-2002
ghe1 ghe1 is offline
Registered User
  
 

Join Date: Mar 2002
Posts: 3
Thumbs up Memory/Swap

Thanks for the help. That is what I needed to hear. I am going to look into the bin directories and see what I find. I just might have to resort to higher help for this one.
Sponsored Links
Closed Thread

Bookmarks

Tags
cpio

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:24 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0