Hi,
Does any body knows how to specify a unlimited core
size in PERL?
I know of using this command,
$coresize = pack("i2",0,0);
syscall(&SYS_setrlimit, &RLIMIT_CORE, $coresize);
but the issue is I couldn't find anywhere how exactly
should I specify and unlimited CORE size in it?
Any help is
Hi,
How can I check if a Perl Module is installed in my System from a Perl Program?
I want to do something like this:
#!/usr/local/bin/perl
if () {
use Quota;
}
Any help is appreciated.
Thanks,
Arijit
Start your day with Yahoo! - make it your home page _
How can I time out a subroutine/function?
print "My code is executing...the next sub inokation
takes a long time simetimes. SO, I want to ensure that
at max it should take 5 secsonds.";
my $device_name = Quota::getqcarg($path);
I want to timeout Quota::getqcarg($path) but I don't
want to use the
ved in this subroutine
> taking
> a long time intermittently?
>
> Marty
>
>
> --- Arijit Das <[EMAIL PROTECTED]> wrote:
>
> > How can I time out a subroutine/function?
> >
> > print "My code is executing...the next sub
> inokation
> > takes a
Its about sharing a Perl Variable among parent and child processes.
Do you know of any design pattern or technique by which this can be achieved?
What I want is this...
$shared_var = 10;
if ($pid = fork) {
sleep 10;
print "$shared_var\n"; # Should show the child's changes...
} elsif
Is there a Perl func which, when executed, ensures that all the open file descriptors of the corresponding process are flushed immediately?
What I am looking for is this...
#!/usr/bin/perl
# Open lots of files here and write some data to them but do not flush any of them...
...
a
Hello everybody,
Thanks a lot for all your suggesstions...
I think I should be able to solve my problem in the best possible way with one of your suggestions.
Thanks again,
ArijitMatt Schneider <[EMAIL PROTECTED]> wrote:
Perhaps others might know better but to the best of my knowledge the
; from another non-spammer site please.)
>
> ----- Original Message -
> From: "Arijit Das" <[EMAIL PROTECTED]>
> To: ;
>
> Sent: Thursday, August 25, 2005 8:25 PM
> Subject: Flushing all open file descriptors...
>
>
> > Is there a Perl func which
them.
-Arijit
--- $Bill Luebkert <[EMAIL PROTECTED]> wrote:
> Arijit Das wrote:
>
> > Is there a Perl func which, when executed, ensures
> that all the open
> > file descriptors of the corresponding process are
> flushed immediately?
> >
> > What I am l
--- $Bill Luebkert <[EMAIL PROTECTED]> wrote:
> Arijit Das wrote:
>
> > I think you are missing out here...
>
> Let's hope not.
>
> > DIsk files are always fully-buffered, STOUT is
> line
> > buffered and STDERR is unbuffered.
>
> Not
Is there anything like set -x in Boure Sheel scripts
in Perl which can print all the statements as they are
executed?
-Arijit
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs
___
Given a UNIX flavor/machine, say a Linux box, I need to figure out the size of the file system block of the current file system I am working in. Generally, it is multiple of 512 but less than the page frame size...but how can I get the exact value of my current file system?
Any idea...?
Thanks,
Thanks Bruce...Your solution was good. But unfortunately it doesn't seem to work on RH Linux 7.2 and RHAS3.0 which is what I need.
Went though its documentation.Seemed like the blksize field of the stat structure is not very portable...which is what the Linux failures proves...
-ArijitBruce
eon RHES and 7.2use File::stat;my $file = "./blah";my $st = "";my $blocksize = 0;$st = stat($file);$blocksize = $st->blksize;print "Blocksize: [$blocksize]\n";HTHJD--- Arijit Das <[EMAIL PROTECTED]>wrote:> Thanks Bruce...Your solution was good. But> unfortunate
Look at the difference of memory usage for the same command..."sleep 200 &" in RH7.2, RH3.0 and Suse machine.
vsize gives the Virtual memory size in bytes.
RH7.2:
eurika120:arijit>sleep 200 &[1] 24775eurika120:arijit>ps -eo pid,comm,size,sz,vsz,vsize | grep sleep24775 sleep - 484
As a non-superuser, any idea how can I get the page size of the underlying unix operating system?
Thanks,
Arijit__Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___
ThanksI found this out this morning.
pagesize isnot supported in Linux.
Yet another way is getpagesize() function...
Thanks anywys...
-ArijitBrian Raven <[EMAIL PROTECTED]> wrote:
From: [EMAIL PROTECTED][mailto:[EMAIL PROTECTED] On Behalf Of ArijitDasSent: 23 September 2005 06:08To: acti
I have a huge Software System with lots of sub-systems and processes in it.
One of my file system's folder like "/u/arijit/MySystem/log" is getting deleted unintentionally by any of these processes.
Is there a way by which I can track which process is actually deleting this folder? In other wor
Thanks a lot folks for your suggesstions
Jeff is correct...its a directory tree that gets deleted. To worsen the situation, I don't have root access to the system to do stuffs like recompiling perl binary, putting in handlers to be executed by the kernel b4 executing any unlink system call.
It deletes everything recursively down.
Its not always the same directory but it is always the current directory (pwd)
-ArijitSteve Dawson <[EMAIL PROTECTED]> wrote:
Arijit Das wrote:> > ...its a directory tree that gets deleted.Does it delete just one level or are there sub dire
In Perl, after closing STDOUT, how can I reopen it? print "Writing to STDOUT before closing STDOUT..."; close STDOUT; open STDOUT, ... print "Writing back to STDOUT..."; Thanks, Arijit
Yahoo! Personals
Single? There's someone we'd like you to meet.
Lots of someones, actually.
Appologies for asking this question in a Perl forum..But I expect lots of UNIX experts here...so am posting this question. Is there a way I can have the syntax of my crontab file checked in a Solaris System? Basically, I have a crontab file which looks perfect to me syntactically but I get
I am just wondering why is this giving a strange result. Any clues...? bash-2.01$ echo 4.56 | perl -p -e 'my $var1 = ; $var2 = $var1 * 100; print $var2;'04.56bash-2.01$ I am expecting 456 in the ouput instead of 4.56 Am I missing anything...? Thanks,Arijit
Do you Yahoo!?
With
Thanks a lot folks. My mistake...I should have looked at "-p"'s significance before posting it. Thanks again, ArijitDZ-Jay <[EMAIL PROTECTED]> wrote: Arijit Das wrote:> I am just wondering why is this giving a strange result. Any clues...?> This is from
Hi, I am using Perl5.04 and right now, I do not have the option of upgrading to higher versions for political reasons within the org. With perl 5.04, if I set up a $SIG{ALRM} handler, then I have noticed that my process some times gets into an infinite sleep while handling the ALRM signal.
I am just wondering...what am I doing wrong here. Why isn't "$latest_CPU_load\n" printing the desired value like $top_output[2] Any help here? Thanks, Arijit vgamd127> cat test.pl#!/depot/qsc/VG1.0/bin/perl @top_output = `top -n1 -b -i | head -35`;print "$top_output[2]";$latest_CPU_l
Thanks a lot... Sometimes my head gets jammed like the traffic situation in SFO and these days in Bangalore:-) -Arijit[EMAIL PROTECTED] wrote: Hi Arijit, >I am just wondering...what am I doing wrong here. Why isn't "$latest_CPU_load\n" printing the desired value like $top_output[2]
Is there any way to time out a unix command? Its something like this... I want my PerlPgm to be killed by the shell (sh/bash/csh) if my PerlPgm fails to finish off by 300 elapsed seconds. Something like -timeout 300 might_hang.pl This should execute might_hang.pl normally but if m
I need a priority message queue which should be usable by different unrelated processes and usable/acceisible from different machines (may be using a filesystem path). So, its like I want the behaviour of an UNIX::IPC::MsgQueue but I need visibility/accessibility like a FIFO. FIFOs can be opene
There are three type of times usually associated with a file. 1) Last File modification time 2) Last File access time 3) Last Inode Modification time. It seems like the first two times can be pre-dated by using the touch command. ## pre-Dating to 31-Jan-2006 touch -c -t 01311200.00 core
Any idea what am I doing wrong here...? Why isn't
setsid working?
Thanks,
Arijit
vgamd129> ./test.pl
21544: My pgid = 21544
$sess_id = -1
vgamd129> cat test.pl
#!/depot/qsc/VG1.0/bin/perl
use POSIX;
setpgrp($$, $$);
$gpid = getpgrp();
print "$$: My pgid = $gpid\n";
$sess_id = POSIX::setsid(
Ooops ... my mistake!
A session creator shdn't be a process group leader.
Thanks anyways,
Arijit
--- Arijit Das <[EMAIL PROTECTED]> wrote:
> Any idea what am I doing wrong here...? Why isn't
> setsid working?
>
> Thanks,
> Arijit
>
> vgamd129> ./test
Hi,
The format of env variable PATH seems to change with
OS/shell. For example,
in sh it is like
"/dir1/bin:/dir2/bin:."
while in csh, it is like
(/dir1/bin /dir2/bin .)
I need to search for "/dir2/bin" path component in my
$ENV{PATH}, and then, insert "/newpath/bin" just
before "/dir2/bin"
I have a huge perl script of which I want to get the
execution trace (PERLDB_OPTS='NonStop AutoTrace
LineInfo=execution_trace.out') of say just a single
subroutine "sub init()".
I cannot have my PERLDB_OPTS set to 'NonStop AutoTrace
LineInfo=execution_trace.out' right from the begining
because th
34 matches
Mail list logo