- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Setmemwindow command
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2004 01:07 AM
09-13-2004 01:07 AM
I tried to use Setmemwindow command as explained in /usr/share/doc/mem_wndws.txt but with no success .
steps I did :
1. set max_mem_window to 20
2. # cat /etc/services.window
database1 20
database2 30
database3 40
3. # more startDB1.sh
WinId=$(getmemwindow database1)
setmemwindow -i $WinId /Gen/test/script/startDB1 "hello"
4. /Gen/test/script/startDB1
5. # ./memwin_stats -m
Shared Memory:
T ID KEY MODE OWNER GROUP UserKey KernId
m 0 0x2f100002 --rw------- root root Global 0
m 1 0x411c061e --rw-rw-rw- root root Global 0
m 2 0x4e0c0002 --rw-rw-rw- root root Global 0
m 3 0x412048a9 --rw-rw-rw- root root Global 0
m 4 0x00000000 --rw------- root sys Global 0
m 15877 0x431c3bbf --rw-rw-rw- daemon root Global 0
Problem is that NO new shared memory (UserKey=20) created !
PHCO_23705 installed on the system ( HPUX11.0 )
What I'm doing wrong ?
Thanks,
Jose
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2004 02:13 AM
09-13-2004 02:13 AM
Re: Setmemwindow command
# ll startDB1.sh
What happens when you execute it?
# ./startDB1.sh
Do you see:
writing to segment: "DB1 says hello!"
Key is 1377042728
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2004 02:19 AM
09-13-2004 02:19 AM
Re: Setmemwindow command
Thanks for reply
# ll startDB1.sh
-rwxrwxrwx 1 root sys 110 Sep 13 15:40 startDB1.sh
When i ran :
# ./startDB1.sh
I got nothing - just the prompt !
Jose
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2004 02:28 AM
09-13-2004 02:28 AM
Re: Setmemwindow command
Have you configured your system to allow it have memory window?
Look in /stand/system if you have a line in the configurable params calledmax_mem_window
Here is an example of what it should look like:
max_mem_window 2
If you dont, you will have to configure and generate a new kernel
All the best
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2004 02:35 AM
09-13-2004 02:35 AM
Re: Setmemwindow command
Thanks for the reply .
# grep -i max_mem /stand/system
max_mem_window 20
Jose
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2004 02:51 AM
09-13-2004 02:51 AM
Re: Setmemwindow command
20 is quite a lot... (?)
What do you see when you type ~/memwin_stats -mw ?
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2004 02:54 AM - last edited on 09-16-2024 02:09 AM by support_s
09-13-2004 02:54 AM - last edited on 09-16-2024 02:09 AM by support_s
Re: Setmemwindow command
# ./memwin_stats -mw
Shared Memory:
T ID KEY MODE OWNER GROUP UserKey KernId
m 0 0x2f100002 --rw------- root root Global 0
m 1 0x411c061e --rw-rw-rw- root root Global 0
m 2 0x4e0c0002 --rw-rw-rw- root root Global 0
m 3 0x412048a9 --rw-rw-rw- root root Global 0
m 4 0x00000000 --rw------- root sys Global 0
m 15877 0x431c3bbf --rw-rw-rw- daemon root Global 0
Entry USER_KEY KERN_KEY QUAD2_AVAIL QUAD3_AVAIL PID REFCNT
Memory Windows:
0 Global 0 262128 261802 6066 228
1 Unused 1 262128 262144 6238 0
2 Unused 2 262128 262144 0 0
3 Unused 3 262128 262144 0 0
4 Unused 4 262128 262144 0 0
5 Unused 5 262128 262144 0 0
6 Unused 6 262128 262144 0 0
7 Unused 7 262128 262144 0 0
8 Unused 8 262128 262144 0 0
9 Unused 9 262128 262144 0 0
10 Unused 10 262128 262144 0 0
11 Unused 11 262128 262144 0 0
12 Unused 12 262128 262144 0 0
13 Unused 13 262128 262144 0 0
14 Unused 14 262128 262144 0 0
15 Unused 15 262128 262144 0 0
16 Unused 16 262128 262144 0 0
17 Unused 17 262128 262144 0 0
18 Unused 18 262128 262144 0 0
19 Unused 19 262128 262144 0 0
20 Unused 20 262128 262144 0 0
Jose
- Tags:
- memory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2004 03:11 AM
09-13-2004 03:11 AM
Re: Setmemwindow command
I will look and see if I still have anything on how I implemented but it was some time ago (3 years now) and no more used:
Entry USER_KEY KERN_KEY QUAD2_AVAIL QUAD3_AVAIL PID REFCNT
Memory Windows:
0 Global 0 262144 244401 0 1387
1 Private 1 0 0 0 1
2 Unused 2 262144 262144 0 0
3 Unused 3 262144 262144 0 0
Till then,
All the best
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2004 04:53 AM
09-13-2004 04:53 AM
SolutionI just tried, using your informations, here is what I get:
wilhelm:/home/vbe $ more memwin_test
WinId=$(getmemwindow database1)
setmemwindow -i $WinId /home/vbe/memwin_test "DB1 says hello!"
wilhelm:/var/adm $ more /etc/services.window
#
# File: /etc/services.window
# @(#)B.11.11_LR
#
# The format of this file is name followed by a space/tab followed by
# a unique user key. A memory window application uses the
# getmemwindow(1M) command to extract the user key and then passes that
# key to the setmemwindow(1M) command. Using the same key places
# those applications in the same memory window.
#
# For example:
#
# winid=getmemwindow database1
# setmemwindow -i $winid startup_script arg1 arg2 arg3.
#
database1 20
database2 30
database3 40
wilhelm:/sm/bin $ ./memwin_stats -mw
Shared Memory:
T ID KEY MODE OWNER GROUP UserKey KernId
m 0 0x411c275e --rw-rw-rw- root root2013202240 2013202240
m 1 0x4e0c0002 --rw-rw-rw- root root2013202240 2013202240
m 2 0x41200040 --rw-rw-rw- root root2013202240 2013202240
m 3 0x301c5765 --rw-rw-rw- root root2013202240 2013202240
m 516 0x0c6629c9 --rw-r----- root root2013202240 2013202240
m 5 0x06347849 --rw-rw-rw- root root2013202240 2013202240
m 6 0x49180029 --rw-r--r-- root root2013202240 2013202240
m 7 0x00000000 D-rw------- root root2013202240 2013202240
m 8 0x00000000 D-rw------- www other2013202240 2013202240
Entry USER_KEY KERN_KEY QUAD2_AVAIL QUAD3_AVAIL PID REFCNT
Memory Windows:
0 Global 0 262144 253421 0 237
1 Private 1 0 0 0 1
2 Unused 2 262144 262144 23447 0
3 Unused 3 262144 262144 0 0
Now I execute after chmod 755 memwin_test:
wilhelm:/home/vbe $ ./memwin_test
And here is the new output of memwin_stats:
wilhelm:/sm/bin $ ./memwin_stats -mw
Shared Memory:
T ID KEY MODE OWNER GROUP UserKey KernId
m 0 0x411c275e --rw-rw-rw- root root2013202240 2013202240
m 1 0x4e0c0002 --rw-rw-rw- root root2013202240 2013202240
m 2 0x41200040 --rw-rw-rw- root root2013202240 2013202240
m 3 0x301c5765 --rw-rw-rw- root root2013202240 2013202240
m 516 0x0c6629c9 --rw-r----- root root2013202240 2013202240
m 5 0x06347849 --rw-rw-rw- root root2013202240 2013202240
m 6 0x49180029 --rw-r--r-- root root2013202240 2013202240
m 7 0x00000000 D-rw------- root root2013202240 2013202240
m 8 0x00000000 D-rw------- www other2013202240 2013202240
Entry USER_KEY KERN_KEY QUAD2_AVAIL QUAD3_AVAIL PID REFCNT
Memory Windows:
0 Global 0 262144 253421 0 240
1 Private 1 0 0 0 1
2 20 2 262144 262144 24367 747
3 Unused 3 262144 262144 0 0
wilhelm:/sm/bin $
I had to do a Ctrl_c to quit the memwin_test and the result :
wilhelm:/home/vbe $ ./memwin_test
wilhelm:/home/vbe $ ^C
wilhelm:/sm/bin $ ./memwin_stats -mw
Shared Memory:
T ID KEY MODE OWNER GROUP UserKey KernId
m 0 0x411c275e --rw-rw-rw- root root2013202240 2013202240
m 1 0x4e0c0002 --rw-rw-rw- root root2013202240 2013202240
m 2 0x41200040 --rw-rw-rw- root root2013202240 2013202240
m 3 0x301c5765 --rw-rw-rw- root root2013202240 2013202240
m 516 0x0c6629c9 --rw-r----- root root2013202240 2013202240
m 5 0x06347849 --rw-rw-rw- root root2013202240 2013202240
m 6 0x49180029 --rw-r--r-- root root2013202240 2013202240
m 7 0x00000000 D-rw------- root root2013202240 2013202240
m 8 0x00000000 D-rw------- www other2013202240 2013202240
Entry USER_KEY KERN_KEY QUAD2_AVAIL QUAD3_AVAIL PID REFCNT
Memory Windows:
0 Global 0 262144 253421 0 239
1 Private 1 0 0 0 1
2 Unused 2 262144 262144 29380 0
3 Unused 3 262144 262144 0 0
wilhelm:/sm/bin $
Good luck
Victor