Total Memory/Swap Memory


 
Thread Tools Search this Thread
Special Forums Hardware Filesystems, Disks and Memory Total Memory/Swap Memory
# 1  
Old 03-29-2002
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  
Old 03-29-2002
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.

https://www.unix.com/showthread.php?s...light=websites

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  
Old 03-29-2002
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  
Old 04-01-2002
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.
https://www.unix.com/showthread.php?s...&highlight=bin


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  
Old 04-01-2002
MySQL 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.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

SWAP memory

Admins, How can I configure the server so that it will utilize the swap file as little as possible? Please correct me if I'm wrong, I would say change the value of sysctl - vm.swappiness? And if, how can I keep it permenatly even after rebooting the system? since no related parameters in... (7 Replies)
Discussion started by: leo_ultra_leo
7 Replies

2. Red Hat

Swap memory

Hi team, Is there any ability to force the system to use the swap memory for a specific service? And prevent another service of using the swap memory? Thanks (2 Replies)
Discussion started by: leo_ultra_leo
2 Replies

3. HP-UX

How much Swap memory do i have ?

here is the output of swapinfo command ==> swapinfo Kb Kb Kb PCT START/ Kb TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME dev 8192000 0 8184000 0% 0 - 1 /dev/vg00/swap reserve - 8184000 -8184000 memory ... (5 Replies)
Discussion started by: mohtashims
5 Replies

4. UNIX for Dummies Questions & Answers

Is swap and Shared memory the same ?

In Linux, Unix environments Is swap and Shared memory the same ? In Linux, swap is mounted on /dev/shm ? I am wondering if the naming of 'shm' has anything to do with Shared memory ? (3 Replies)
Discussion started by: kraljic
3 Replies

5. UNIX for Advanced & Expert Users

Query regarding swap memory

Hi, Please help explain and answer the below: 1. I need to predetermine how much swap will my JVM use if it is started with -Xms 512M and -Xmx 1024M ? 2. Can a JVM process just use the Heap and not the Swap memory ? 3. If the Total physical RAM on my server is 8 GB and current Heap... (6 Replies)
Discussion started by: mohtashims
6 Replies

6. Red Hat

Total Memory

Hi, I have a strange issue where the total memory on the server is showing low. At the moment 8 GB of memory is installed and only 3 GB is showing on the shell prompt. I am using the commands free -m and vmstat to check the memory. Please help me out in identifying the issue. With regards... (3 Replies)
Discussion started by: shabu
3 Replies

7. UNIX for Dummies Questions & Answers

swap memory

Hi, I want to see used swap memory I know that for this there is command free -m but this shows Swap: 16383 4529 11854 by top command while load is 1.05 max CPU % 24 mysqld why used swap shows 4529 either it is not flushed there is other command... (2 Replies)
Discussion started by: kaushik02018
2 Replies

8. Solaris

Solaris 10 - Memory / Swap

Hi all Got myself in a pickle here, chasing my own tail and am confused. Im trying to work out memory / swap on my solaris 10 server, that Im using zones on. Server A has 32Gb of raw memory, ZFS across the root /mirror drives. # prtdiag -v | grep mem = Memory size: 32768 Megabytes #... (1 Reply)
Discussion started by: sbk1972
1 Replies

9. Solaris

How to find Total and Free Physical Memory and Logical Memory in SOLARIS 9

Hi, Im working on Solaris 9 on SPARC-32 bit running on an Ultra-80, and I have to find out the following:- 1. Total Physical Memory in the system(total RAM). 2. Available Physical Memory(i.e. RAM Usage) 3. Total (Logical) Memory in the system 4. Available (Logical) Memory. I know... (4 Replies)
Discussion started by: 0ktalmagik
4 Replies

10. Solaris

swap memory

Hi Can any help me on setting the swap memory ? I would like to set swap memory for installing oracle 9i software. RAM - 512 Mb HDD - 40 Gb OS - Sun Solaris 5.9 (6 Replies)
Discussion started by: sivaramat
6 Replies
Login or Register to Ask a Question