Question about shared memory

Forum for questions and support relating to the 1.24.x releases only.
Locked
PacoLM
Posts: 971
Joined: Wed Dec 02, 2009 9:55 pm
Location: Spain

Question about shared memory

Post by PacoLM »

Hi,

I have a Guruplug with 3 cameras, these are my settings in /etc/sysctl.conf:

Code: Select all

kernel.shmmax = 3221225472
kernel.shmall = 786432
And this is the ipcs output:

Code: Select all

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status      
0x7a6d0001 1114112    www-data   700        6913112    2                       
0x7a6d0002 1146881    www-data   700        6913112    2                       
0x7a6d0003 1376258    www-data   700        6913112    1   
Everything works fine, but I have a doubt.... could anyone explain me (I'm a newbie!), the 'df -f' command output?

Code: Select all

Filesystem            Size  Used Avail Use% Mounted on
tmpfs                 252M     0  252M   0% /lib/init/rw
udev                   10M  736K  9.3M   8% /dev

tmpfs                 252M  4.0K  252M   1% /dev/shm   <<< look this line!

rootfs                463M  291M  172M  63% /
tmpfs                 252M     0  252M   0% /var/cache/apt
/dev/sdc1              75G  4.7G   70G   7% /zmdisk
Why the system is showing a 1% of shared memory used, if the real use is about 6913112*3 bytes, that is aprox.20 Mbytes??

Any good explanation is welcome! Thanks in advance,

PacoLM
PacoLM
Posts: 971
Joined: Wed Dec 02, 2009 9:55 pm
Location: Spain

Post by PacoLM »

Any clue?
osoroco
Posts: 13
Joined: Mon Mar 07, 2011 3:49 pm

Post by osoroco »

what does the '-f' flag do? it doesn't appear on any of my linux boxes or my mac.

anyway, it probably has to do with rounding, any partition (or shared memory in this instance) that has nothing on it (used column = 0 ) is 0% full, whereas anything over than 0 is automatically 1%; since 1% means there's something on the partition vs. 0% which means that the partition is empty

try filling it to 19M and then to 21M to see if it changes from 1% to 2% :p
PacoLM
Posts: 971
Joined: Wed Dec 02, 2009 9:55 pm
Location: Spain

Post by PacoLM »

Typo : it's df -h....
Locked