[linux] paralelne spustanie procesov (kompresia logov)
Lubomir Host
rajo na platon.sk
Úterý Únor 2 21:51:31 CET 2010
A v Debiane som na to este nasiel balik 'schedtool'
Description: Queries/alters process' scheduling policy and CPU affinity
Schedtool can query or alter a process' scheduling policy in Linux,
specifically assigning SCHED_NORMAL, _FIFO, _RR, _BATCH, _ISO or _IDLEPRIO. It
can set static priority for _FIFO and _RR. Setting CPU-affinity and (re)nicing
is also possible, making schedtool the definitive interface to Linux scheduler.
.
It can be used to avoid skips and glitches in A/V applications, to lock
processes onto given CPUs on SMP/NUMA systems, which may be beneficial for
networking or benchmarks, or to adjust nice-levels of lesser important jobs to
maintain a high amount of interactive responsiveness under high load. It is
also handy to manage realtime processes.
.
If you don't know about scheduling policies, you probably don't want to use
this program - or learn and read "man sched_setscheduler".
.
Some supported scheduling policies (such as SCHED_ISO, or SCHED_IDLEPRIO) need
a patched kernel (eg. Con Kolivas' -ck patchset).
Tag: admin::kernel, implemented-in::c, interface::commandline, role::program, scope::utility, use::configuring, works-with::software:running
On Tue, Feb 02, 2010 at 09:47:59PM +0100, Peter Viskup wrote:
> Nevsimol som si, ze to chces bindovat na jednotlive procesory.
> Pre Perl mozes pouzit modul Forks::Super
> http://search.cpan.org/~mob/Forks-Super-0.11/lib/Forks/Super.pm
> pre prikazovy riadok utility taskset.
>
> --
> Peter Viskup
>
> Peter Viskup wrote:
>> Naskriptuj si to.
>> Ja som to riesil v Perl-e (urcite sa to da aj v shelli ;-) ).
>> (nasledujuci kod nemusi byt plne funkcny a je nutne ho doplnit)
>>
>> # spracuva sa prvy argument vo forme --childs <number>
>>
>> use warnings;
>> use strict;
>> use locale;
>> my $MAXCHILD = 5;
>> my $CURCHILD = 0;
>> my ($num, $start_num, $end_num, $childs) = (0,0,0);
>>
>> use Getopt::Long;
>> if (!GetOptions('childs=i'=>\$childs)) {
>> usage();
>> die "Wrong options!\n";
>> }
>> if ($childs>0){
>> $MAXCHILD=$childs;
>> }
>>
>> while ($num <= $end_num) {
>> if($CURCHILD < $MAXCHILD){
>> if(my $pid = fork()){
>> addchild();
>> }
>> elsif(defined $pid){
>> # tuto nieco vykonava child...
>> exit;
>> }
>> else{
>> die "Fork failed: $!\n";
>> }
>> }
>> else {
>> while($CURCHILD >= $MAXCHILD){
>> my $processid = waitpid(-1, 0);
>> delchild();
>> }
>> }
>> }
>> sub addchild {$num++; $CURCHILD++;}
>> sub delchild {$CURCHILD--;}
>>
>>
>> --
>> Peter Viskup
>>
>>
>> Matus UHLAR - fantomas wrote:
>>> Zdravim,
>>>
>>> poznate niekto aplikaciu ktora by mi umoznila zadefinovat niekolko
>>> procesov
>>> ktore by sa mali spustit, pricom paralelne by malo bezat vzdy max. X
>>> procesov?
>>>
>>> rad by som komprimoval dost velke logy paralelne na kazdom procesore
>>> jeden
>>>
>>>
>>
>>
>
> _______________________________________________
> https://lists.linux.sk/mailman/listinfo/linux
> Meta FAQ: http://www.sklug.sk/lists/linux/metafaq.html
--
,''`. Lubomir Host 'rajo' <rajo AT platon.sk> ICQ #: 257322664
: :' : Jabber: rajo AT jabber.platon.sk VoIP: callto://rajo207
`. `' WWW: http://rajo.platon.sk/ Platon Group: http://platon.sk/
`- GnuPG key: DC0C C7EA 55C8 B089 C41D 944A F251 A93A 2361 A82F
Další informace o konferenci linux