06-12-2009
Perl how to make the 2nd CPU full?
Hi Buddies,
my pc has two CPU, so CPU1 and CPU2.
I have a perl "a.pl", when i "./a.pl", i can see the CPU1 is full or CPU2 is full, mean only one is full, another one is idle.
Wonderring what shall i do in order to let both CPU to process this a.pl.
Thanks
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello all,
I have a sunfire 280R with 2 750 MHz CPU and 2 Gig of RAM. But when I compile things it does not seem to be using all of it's resources thus the compile take forever. At most it seem to be only using at most 10% of CPU and 5% of swap sapce. I have tried to renice the pid of the... (6 Replies)
Discussion started by: larry
6 Replies
2. UNIX for Dummies Questions & Answers
I have the following command prompt perl one liner:
perl -e 's/\(\)\\,\"]//g; s/^\s//g; s/;/\n/g' -pi result1
I tried to move this one liner into a perl script I am practicing with (just started learning perl right now).
I tried the following (I only know how to open a file and output to a... (1 Reply)
Discussion started by: EDALBNUG
1 Replies
3. Solaris
Dear All master
We have Sunfire memory 16G memory and 8 Processor.
I install with Solaris 10,
but i think resource that use all proccess is very much,
I installed this machine 3 times, twice install Oracle the load process make machine is very slow.
in new install process like this,... (1 Reply)
Discussion started by: moslemovic
1 Replies
4. Shell Programming and Scripting
Hi
Need a perl script to read lines in a file, scan for a string named "APPLE" and write to different file the only lines containing the matched string. (5 Replies)
Discussion started by: PrasannaKS
5 Replies
5. Shell Programming and Scripting
I wrote a very simple script that matches combinations of alphabetic characters (1-5). I want to use it to test CPU speeds of different hardware/platforms. The problem is that on multi-core/processor systems, only one CPU is being utilized to execute the script. Is there a way to change that?... (16 Replies)
Discussion started by: ph0enix
16 Replies
6. Shell Programming and Scripting
Iam trying to load the full path of multiplie files in the same directory to an array if the filenames matches a pattern. The following is the current code;
where $input=C:\test
# change to and open the comparison directory
chdir("$input2") || die "Cannot change dir: $!";
opendir(DIR2,... (2 Replies)
Discussion started by: cold_Que
2 Replies
7. UNIX for Advanced & Expert Users
Hi,
In order to have a sand box machine that I could use to test some system changes before going to production state, I'd like to duplicate a working system to a virtual one. Ideally, I'd like to manage to do it this way :
- Make a full system backup excluding the user file system (this... (7 Replies)
Discussion started by: pagaille
7 Replies
8. Solaris
Hello:
I have a machine built on 2 drives and mirrors have been created to a second set of 2 drives (4 total) on the same platform. SVM.
Might anyone provide guidance to create a second machine by breaking the mirrored set, moving the two mirrors (2) to another machine (same platform type),... (1 Reply)
Discussion started by: 4dailyrunner
1 Replies
9. Shell Programming and Scripting
Hi, I got problem with queue code how to determined empty and full and problem with while loop
Here is my pseudo code :
Input page Access
Input Pgae Frame
For i =3 to pageframe count by 1
construct queue of size i
set pageFaultCount to 0
while morepages do
page = NextPage... (1 Reply)
Discussion started by: guidely
1 Replies
10. UNIX and Linux Applications
The problematic directory is the following:
/root/.cache/deja-dup
This directory grows until my "/" is full and then the restoring activity fails.
I already tried to create a symbolic link with origin another partition where I have more space. However during the restoring activity ... (4 Replies)
Discussion started by: puertas12
4 Replies
LEARN ABOUT DEBIAN
svsematest
svsematest(8) svsematest(8)
NAME
svsematest - Start two threads or fork two processes and measure the latency of SYSV semaphores
SYNTAX
svsematest [-a|-a PROC] [-b USEC] [-d DIST] [-f] [-i INTV] [-l loops] [-p PRIO] [-t|-t NUM]
DESCRIPTION
The program svsematest starts two threads or, optionally, forks two processes that are synchronized via SYSV semaphores and measures the
latency between releasing a semaphore on one side and getting it on the other side.
OPTIONS
-a, --affinity[=PROC]
Run on procesor number PROC. If PROC is not specified, run on current processor.
-b, --breaktrace=USEC
Send break trace command when latency > USEC. This is a debugging option to control the latency tracer in the realtime preemption
patch. It is useful to track down unexpected large latencies of a system.
-d, --distance=DIST
Set the distance of thread intervals in microseconds (default is 500 us). When cylictest is called with the -t option and more than
one thread is created, then this distance value is added to the interval of the threads: Interval(thread N) = Interval(thread N-1) +
DIST
-f, --fork
Instead of creating threads (which is the default), fork new processes
-i, --interval=INTV
Set the base interval of the thread(s) in microseconds (default is 1000 us). This sets the interval of the first thread. See also
-d.
-l, --loops=LOOPS
Set the number of loops. The default is 0 (endless). This option is useful for automated tests with a given number of test cycles.
svsematest is stopped once the number of timer intervals has been reached.
-p, --prio=PRIO
Set the priority of the process.
-t, --threads[=NUM]
Set the number of test threads (default is 1, if this option is not given). If NUM is specified, create NUM test threads. If NUM is
not specifed, NUM is set to the number of available CPUs.
EXAMPLES
The following example was running on a 4-way CPU:
# svsematest -a -t -p99 -i100 -d25 -l1000000
#0: ID13110, P99, CPU0, I100; #1: ID13111, P99, CPU0, Cycles 1000000
#2: ID13112, P98, CPU1, I125; #3: ID13113, P98, CPU1, Cycles 813573
#4: ID13114, P97, CPU2, I150; #5: ID13115, P97, CPU2, Cycles 667285
#6: ID13116, P96, CPU3, I175; #7: ID13117, P96, CPU3, Cycles 591403
#1 -> #0, Min 1, Cur 2, Avg 2, Max 12
#3 -> #2, Min 1, Cur 3, Avg 2, Max 12
#5 -> #4, Min 1, Cur 3, Avg 3, Max 12
#7 -> #6, Min 1, Cur 2, Avg 3, Max 11
AUTHORS
Carsten Emde <C.Emde@osadl.org>
SEE ALSO
semop(2)
0.1 svsematest(8)