10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi Fellas,
Not sure how I can dig in even further but we notice that one of our DB servers is showing high Sys% CPU usage even though when I execute the following command :
I can see that postgres is the only one using the CPU. So if anyone can advise me what would be the best way to... (3 Replies)
Discussion started by: arizah
3 Replies
2. Programming
(Apologies for any typos.)
OSX 10.12.3 AND Windows 10.
This is for the serious Python experts on at least 3.5.x and above...
In script format sys.stdout.write() AND sys.stderr.write() seems to work correctly.
Have I found a serious bug in the interactive sys.stdout.write() AND... (2 Replies)
Discussion started by: wisecracker
2 Replies
3. Red Hat
Hi
please see attached picture of the TOP command.
the "java" process seem to consume 700% of cpu
is that mean that he uses 100% of every 7 cpu cores?
thanks (2 Replies)
Discussion started by: guy3145
2 Replies
4. Shell Programming and Scripting
I have a project on which I have to use cpuinfo to get model name, number of cpus and bogomips.. for sys I need the uptime, total ram and from env I need the HOSTNAME.. from CMD ouputs i need the eth0-ip and .df..
The problem is that those modules have to be call from a subroutine and I have to... (0 Replies)
Discussion started by: thiedi16
0 Replies
5. AIX
Hello,
We just purchased two new 4-way (one active one failover) 5Ghz Power6 Servers (failover) with 64GB RAM (32GB per node) runing AIX 6.1 with two LPARs per node connected to our SAN with two 4GB HBAs. The PROD LPAR has 2 dedicated CPUs (4 virtual) and the TEST LPAR has 2 dedicated CPUs.
... (3 Replies)
Discussion started by: troym72
3 Replies
6. Solaris
Hi all,
below is the problem details:
ora10g@CNORACLE1>which ld
/usr/ucb/ld
ora10g@CNORACLE1>cd /usr/ccs/bin
ora10g@CNORACLE1>ln -s /usr/ucb/ld ld
ln: cannot create ld: File exists
ora10g@CNORACLE1>
how to link it to /usr/ccs/bin? (6 Replies)
Discussion started by: SmartAntz
6 Replies
7. Shell Programming and Scripting
Hello,
I have to create shell script being myself real novice in scripting...
I was looking on the Internet for some script examples, but I don't have the basic understanding of the shell. I was trying to do something with “ps” command without success.
For exemple total number of... (2 Replies)
Discussion started by: mr_awd
2 Replies
8. Shell Programming and Scripting
hi,
i hav a script which processes 1000 files one by one in every run jus for searching their corresponding output files at a given path, due to this my script runs for long time and taking more CPU,
can we have any way in which we can have this check at least 100 files in a single shot... (5 Replies)
Discussion started by: Prateek007
5 Replies
9. SCO
Hi everyone,
I have a problem on sco unixware 7.1.4
a Ghost process is consuming cpu usage.
rtpm
cpu 0 ======---------
cpu 1 ===---------------------
cpu 2 ============================================================-----------
cpu 3 ... (1 Reply)
Discussion started by: neal.opperman
1 Replies
10. UNIX for Advanced & Expert Users
Hello experts,
I am writing an application in Solaris, which is supposed to work on PrimePower 650 and SunFire 440 machines. The application listens to the events raised by the Hardware and OS in /dev/log. The application listens to the messages logged into /dev/log and do some processing on... (3 Replies)
Discussion started by: pleaseteachmeun
3 Replies
bind_to_cpu(3) Library Functions Manual bind_to_cpu(3)
NAME
bind_to_cpu - Bind execution to a specific CPU.
LIBRARY
Mach Library (libmach.a)
SYNOPSIS
#include <sys/types.h> #include <sys/resource.h>
int bind_to_cpu(
pid_t pid,
unsigned long cpu_mask ,
unsigned long flag );
PARAMETERS
Specifies the target pid. You must have access rights to the pid. Specifies the CPU on which the thread should run. The target CPU is the
bit index in the mask. If you set more than one bit, an error is generated. A cpu_mask of zero clears any previously set CPU binding.
Specifies options to CPU binding. Currently only the option BIND_NO_INHERIT is supported. When set, this option causes child processes
and threads to not inherit the CPU binding.
DESCRIPTION
Upon return from bind_to_cpu, all threads of the target pid are running on the target CPU. Bound threads are not eligible for execution on
any other CPU. You release CPU binding by invoking bind_to_cpu with a cpu_mask of zero.
EXAMPLES
/*
* Fork child process and force it to run on cpu number 3.
* Processes created by the forked child will not inherit bindings.
*/ #include <sys/resource.h> #include <sys/sysinfo.h> #include <sys/signal.h> #include <sys/types.h>
#define CPU_3 0x8 /* Bit 3 set */
main() {
pid_t pid;
if (pid = fork()) { /* parent */
if (bind_to_cpu(pid, CPU_3, BIND_NO_INHERIT)) {
kill(pid, SIGKILL);
exit(1); /* bind_to_cpu() will print error msg */
}
sleep(2); /* wait for child to print CPU */
}
else { /* child */
long cpu_num;
sleep(1); /* wait for parent to bind CPU */
getsysinfo(GSI_CURRENT_CPU, &cpu_num, 0L, 0L, 0L);
printf("child running on CPU %d
", cpu_num);
} }
In this example, the CPU_3 symbol is defined so that bit three in the bit mask is set. When the pid returned from the fork routine identi-
fies the parent routine, the bind_to_cpu routine is called. This routine binds the child process to CPU number three, as specified in the
CPU_3 symbol. When the pid returned from the fork routine identifies the child routine, the child routine sleeps to give the parent routine
time to set its CPU binding. Then it uses the getsysinfo call to determine its CPU and displays its CPU with the printf routine.
If the return value from the bind_to_cpu routine indicates an error, the parent process kills the child process and exits with an error
status.
RETURN VALUES
Upon successful completion, bind_to_cpu returns zero. Upon error, a -1 is returned.
RELATED INFORMATION
Commands: runon(1)
Functions: getsysinfo(2) delim off
bind_to_cpu(3)