Sponsored Content
Special Forums UNIX and Linux Applications Infrastructure Monitoring Database table and Shared mem Sync issues Post 302394778 by Corona688 on Friday 12th of February 2010 01:22:52 PM
Old 02-12-2010
Quote:
Originally Posted by trendzy2010
The DB operations are independent of shared mem.
I see.

Whenever you modify the DB, you must update the shared mem. If you can't, there's no point in having it -- its contents can't be trusted. If the database isn't fast enough to rely on, you need a faster backend, or an improved interface to it -- try prepared queries, procedures, views. Try keeping a persistent connection somewhere instead of making a new one all the time.

Last edited by Corona688; 02-12-2010 at 02:30 PM..
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

export table from oracle database

i would like to export a particular table in my oracle database installed in a hpux box. i would like to determine the filesize of the output before performing these action so i can assess if my harddisk can still handle it. thanks as usuall :rolleyes: (1 Reply)
Discussion started by: inquirer
1 Replies

2. UNIX for Advanced & Expert Users

Upload of the images from the folder to the Database table

Hi all, i am new to the unix enviorment i have got a urgent requirement where we need to migrate the date from the folder heirachy that contains the "IMAGES". These images are to be uploaded on to the database table. Uploading images from the a single folder (Static) to the... (0 Replies)
Discussion started by: shashisaini24
0 Replies

3. Shell Programming and Scripting

ccall database and collect data from one table

I want to connect to one database and collect data from any table using shell script. (0 Replies)
Discussion started by: rinku
0 Replies

4. UNIX for Dummies Questions & Answers

Creating a table (graphic not database)

Hi, I want to create a table on our unix box that allows the user to tab through it and select certain option by putting an asterix or similair into it. e.g. -------------- |Start App | | |Stop App |*| etc... Can this be done using a script (never seen any graphics options in ksh, but... (2 Replies)
Discussion started by: dlam
2 Replies

5. Shell Programming and Scripting

How to use awk for printing line from database table?

Hi , I have inserted some records in a table having column "value1 varchar2(4000)" and want to spool in a file. I have written as below set echo off set feed off set hea off set wra off set lin 500 spo temp_table and fired select query as below select value1 from temp_table; spo... (6 Replies)
Discussion started by: CaapAjayShukla
6 Replies

6. UNIX for Advanced & Expert Users

Synchronize DataBase Table Between Machines Via SSH?

Hello I have 2 servers that need a database table to be one way synchronized (server A needs to push the table to server B) I considered using a FEDERATED DB, but decided against it for my particular application (Server B has several apps that would be calling the table repeatedly, and a... (3 Replies)
Discussion started by: kettlewell
3 Replies

7. UNIX for Advanced & Expert Users

Solaris 10 routing table issues

Hello Hope someone can help with this problem. We are running Solaris 10 with a current kernel patch of 142900-09. We appear to be getting a serious issue with the routing table as shown below: Output from netstat -rnv Destination ....Mask ............Gateway ........Device... (2 Replies)
Discussion started by: gregsih
2 Replies

8. AIX

Cannot get shared lock on database for rpm on AIX 6.1

Hello, I was trying to install python on aix and it was taking too long and I closed the terminal. Now when i issue the command rpm -qa instead of getting all the rpms installed I'm getting the following error. root:stud -> $ rpm -qa cannot get shared lock on database rpmQuery: rpmdbOpen()... (2 Replies)
Discussion started by: gaugeta
2 Replies

9. Shell Programming and Scripting

Update a database table in a for loop

Im trying to update an informix database table for each occurance of a head_barcode in a file called mw within a for loop please see below - cant get the syntax correct. any help please? for a in `cat /tmp/mw` do sql image - << STOP > /dev/null 2>&1 update doc_table set status =... (4 Replies)
Discussion started by: worky
4 Replies
SHM_MAP(9)						   BSD Kernel Developer's Manual						SHM_MAP(9)

NAME
shm_map, shm_unmap -- map shared memory objects into the kernel's address space SYNOPSIS
#include <sys/types.h> #include <sys/mman.h> int shm_map(struct file *fp, size_t size, off_t offset, void **memp); int shm_unmap(struct file *fp, void *mem, size_t size); DESCRIPTION
The shm_map() and shm_unmap() functions provide an API for mapping shared memory objects into the kernel. Shared memory objects are created by shm_open(2). These objects can then be passed into the kernel via file descriptors. A shared memory object cannot be shrunk while it is mapped into the kernel. This is to avoid invalidating any pages that may be wired into the kernel's address space. Shared memory objects can still be grown while mapped into the kernel. To simplify the accounting needed to enforce the above requirement, callers of this API are required to unmap the entire region mapped by shm_map() when calling shm_unmap(). Unmapping only a portion of the region is not permitted. The shm_map() function locates the shared memory object associated with the open file fp. It maps the region of that object described by offset and size into the kernel's address space. If it succeeds, *memp will be set to the start of the mapping. All pages for the range will be wired into memory upon successful return. The shm_unmap() function unmaps a region previously mapped by shm_map(). The mem argument should match the value previously returned in *memp, and the size argument should match the value passed to shm_map(). Note that shm_map() will not hold an extra reference on the open file fp for the lifetime of the mapping. Instead, the calling code is required to do this if it wishes to use shm_unmap() on the region in the future. RETURN VALUES
The shm_map() and shm_unmap() functions return zero on success or an error on failure. EXAMPLES
The following function accepts a file descriptor for a shared memory object. It maps the first sixteen kilobytes of the object into the ker- nel, performs some work on that address, and then unmaps the address before returning. int shm_example(int fd) { struct file *fp; void *mem; int error; error = fget(curthread, fd, CAP_MMAP, &fp); if (error) return (error); error = shm_map(fp, 16384, 0, &mem); if (error) { fdrop(fp, curthread); return (error); } /* Do something with 'mem'. */ error = shm_unmap(fp, mem, 16384); fdrop(fp, curthread); return (error); } ERRORS
The shm_map() function returns the following errors on failure: [EINVAL] The open file fp is not a shared memory object. [EINVAL] The requested region described by offset and size extends beyond the end of the shared memory object. [ENOMEM] Insufficient address space was available. [EACCES] The shared memory object could not be mapped due to a protection error. [EINVAL] The shared memory object could not be mapped due to some other VM error. The shm_unmap() function returns the following errors on failure: [EINVAL] The open file fp is not a shared memory object. [EINVAL] The address range described by mem and size is not a valid address range. [EINVAL] The address range described by mem and size is not backed by the shared memory object associated with the open file fp, or the address range does not cover the entire mapping of the object. SEE ALSO
shm_open(2) HISTORY
This API was first introduced in FreeBSD 10.0. BSD
December 14, 2011 BSD
All times are GMT -4. The time now is 03:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy