I am a novice Unix scripter and need a little advice/help on a script I've written that's causing some problems. We are using Solaris 9 on a Sun box and the script is invoked with the korn shell. I have a two-part question: I wrote a shell script that calls and executes 3 separate sql scripts,... (3 Replies)
Hi Folks,
I have a issue regards space in the records.
Example:
999207404 |sp818056|STEVEN |LAWRENCE |Mike.S.Lawrence@sprint.com |2003 S Data Sales Mgr 77 |SVC ... (5 Replies)
Hi all,
I have a KSH script which is kicking off an sql scripts as follows:
/usr/local/installs/instantclient_10_2/sqlplus -s username/password @$sql_path/sql_query.sql > $tmp_path/sql_query_results
The problem I have is that sometimes the 10g Oracle Database spits out an error saying... (4 Replies)
Am having a nightmare with a certain piece of code.. have tried almost everything and just cannot see what the issue is..
CREATE OR REPLACE VIEW TOP_EARNER_PER_LOCATION
AS
SELECT E.FIRST_NAME || ' ' || E.LAST_NAME AS EMPLOYEE_NAME,
L.REGIONAL_GROUP AS REGIONAL_GROUP,
... (1 Reply)
Hi,
I'm planning to load the data from FLAT files into tables.
Source file: more input.txt
LRNO|Bale|Horsepower|NumberOfBarges|BollardPull|NumberOfCars|GasCapacity|GrainCapacity|IndicatedHorsepower|LiquidCapacity|... (6 Replies)
HI friends , i am also facing an issue in mysql
i ma trying to insert detail in a variable but not got success
#!/bin/sh
mysql -u<username> -p<password> <dbname> << EOF
DEV=`mysql --skip-column-names <dbname> -e "SELECT timestamp from process_record where id = 1"`
EOF
echo $DEV
ERROR... (3 Replies)
Hi all
I am writing a shell script which will run a select query from a table . If the ouput is not 500 - then send a email to the team saying there is a error . But i am not sure how to redirect this output of the select query to the log file -
#!/bin/ksh
sqlplus /nolog
conect... (1 Reply)
RHEL 6.2/Bash shell
root user will be executing the below script. It switches to oracle user logs in using sqlplus and tries to
run the below UPDATE statement. All the commands after su -c are enclosed in a single quote delimited by semicolon.
The execution has failed because the quotes... (3 Replies)
Greetings Experts,
I have an excel file and I am unable to read it directly into awk (contains , " etc); So, I cleansed and copied the data into notepad.
I need to generate a script that generates the SQL.
Requirement:
1. Filter and select only the data that has the "mapping" as "direct"... (4 Replies)
Discussion started by: chill3chee
4 Replies
LEARN ABOUT NETBSD
percpu_putref
PERCPU(9) BSD Kernel Developer's Manual PERCPU(9)NAME
percpu, percpu_alloc, percpu_free, percpu_getref, percpu_putref, percpu_foreach -- per-CPU storage allocator
SYNOPSIS
#include <sys/percpu.h>
typedef void (*percpu_callback_t)(void *, void *, struct cpu_info *);
percpu_t *
percpu_alloc(size_t size);
void
percpu_free(percpu_t *pc, size_t size);
void *
percpu_getref(percpu_t *pc);
void
percpu_putref(percpu_t *pc);
void
percpu_foreach(percpu_t *pc, percpu_callback_t cb, void *arg);
DESCRIPTION
The machine-independent percpu interface provides per-CPU, CPU-local memory reservations to kernel subsystems. percpu_alloc(size) reserves
on each CPU an independent memory region of size bytes that is local to that CPU, returning a handle (percpu_t) to those regions. A thread
may subsequently ask for a pointer, p, to the region held by the percpu_t on the thread's current CPU. Until the thread relinquishes the
pointer, or voluntarily sleeps, the thread may read or write the region at p without causing interprocessor memory synchronization.
FUNCTIONS
percpu_alloc(size)
Call this in thread context to allocate size bytes of local storage on each CPU. The storage is initialized with zeroes. Treat
this as an expensive operation. percpu_alloc() returns NULL on failure, and a handle for the per-CPU storage on success.
percpu_free(pc, size)
Call this in thread context to return to the system the per-CPU storage held by pc. size should match the size passed to
percpu_alloc(). When percpu_free() returns, pc is undefined. Treat this as an expensive operation.
percpu_getref(pc)
Disable preemption and return a pointer to the storage held by pc on the local CPU. Use percpu_getref() in either thread or inter-
rupt context. Follow each percpu_getref() call with a matching call to percpu_putref().
percpu_putref(pc)
Indicate that the thread is finished with the pointer returned by the matching call to percpu_getref(). Re-enables preemption.
percpu_foreach(pc, cb, arg)
On each CPU, for ci the corresponding struct cpu_info * and p the CPU-local storage held by pc, run (*cb)(p, arg, ci). Call this in
thread context. cb should be non-blocking and fast. Do not rely on cb to be run on the CPUs in any particular order.
CODE REFERENCES
The percpu interface is implemented within the file sys/kern/subr_percpu.c.
SEE ALSO atomic_ops(3), kmem(9), pcq(9), pool_cache(9), xcall(9)HISTORY
The percpu interface first appeared in NetBSD 6.0.
AUTHORS
YAMAMOTO Takashi <yamt@NetBSD.org>
BSD January 23, 2010 BSD