File: README

package info (click to toggle)
yp-svipc 0.16-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 340 kB
  • sloc: ansic: 2,165; python: 260; makefile: 67
file content (73 lines) | stat: -rw-r--r-- 2,021 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73

System-V plugin for yorick / python.

note: MacOSX does not provide semtimedop. The module provides a hacked
implementation that emulates the behaviour.

TIPS AND TRICKS:

- max number of sem -> 1024
     sysctl -w kernel.sem="250 32000 32 1024"
     sysctl -w kernel.sem="500 32000 32 1024"

- (linux) the maximum amount of shared memory is a kernel config parameter.
   You may find what value it's using one of these commands. The value
   printed is a number of bytes:
   
      sysctl kernel.shmmax
      
      cat /proc/sys/kernel/shmmax
      
   You can change this value 'on the fly' issuing one of these commands
   as 'root'. Here 3221225472 corresponds to 3 GB
      
      sysctl -w kernel.shmmax=3221225472
      
      echo 3221225472 > /proc/sys/kernel/shmmax
      
   To change the default value so it is setup everytime the kernel is booted:
      
      edit the file:
         
         /etc/sysctl.conf
      
      add/modify the entry:
         
         kernel.shmmax = <number of bytes>

- osx:

   sysctl -w kern.sysv.shmmax=33554432
   sysctl -w kern.sysv.shmmin=1
   sysctl -w kern.sysv.shmmni=256
   sysctl -w kern.sysv.shmseg=64
   sysctl -w kern.sysv.shmall=8192

   kern.sysv.shmmni may no work from the command line,
   edit /etc/sysctl.conf and reboot.



- trace memory usage of your process

   watch -d ps -C yorick -F
   watch -d ps -C python -F

- "ipcs" provides some handy commands to work from the shell.
  consult the man page for details

  linux:
    ipcs | grep 0xbadca
    ipcrm -M 0xbadcafe -S 0xbadcafe
   
    ipcrm `ipcs | egrep '0x7dc' | awk '{print "-S " $1}'`
    ipcrm `ipcs | egrep '0x7dc' | awk '{print "-M " $1}'`
    ipcrm `ipcs | egrep '0x7dc' | awk '{print "-Q " $1}'`
    ipcrm `ipcs | egrep '0x808|0xdcb|0x101' | awk '{print "-S " $1}'`
    ipcrm `ipcs | egrep '0x808|0xdcb|0x101' | awk '{print "-M " $1}'`
    ipcrm `ipcs | egrep '0x808|0xdcb|0x101' | awk '{print "-Q " $1}'`

   osx:
    ipcrm `ipcs | egrep '0x808|0xdcb' | awk '{print "-s " $2}'`