solaris

Help analysing a process before it crashes and consumes all resources on a box

Hi guys, One of the servers I'm working on regularly crashes/freezes and consumes ALL resources on the box. It will continue doing this until the process is killed (difficult to run manually since the box has no resources to allow me even to enter a command) or the box is manually rebooted. I'm not very experienced in unix OSes - can y...

What can cause fwrite to hang?

My code is hanging fwrite with the following stack: libc.so.6.1::___lll_lock_wait libc.so.6.1::fwrite This seems to be happening in solaris. Only incorrect thing which I can think of is that my code may try to do a parallel fclose on the same FILE pointer which is used for doing fwrite. If a parallel fclose happens will it lead to th...

gcc, 64 bit, oracle, solaris

info@s490up # gcc -std=gnu99 -o bla -g -O2 -DSunOS=1 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES= -I/usr/include/libxml2 -I/u/app/oracle/product/11.2/rdbms/demo -I/u/app/oracle/product/11.2/rdbms/public -I/u/app/oracle/product/11.2/rdbms/demo -I/u/app/oracle/product/11.2/rdbms/public blabla.c -lclntsh -lrt -lresolv -lnsl -lsocket -lm -lpthread...

Solaris 10: handle gracefully ENOBUFS error when changing socket buffer

I have stumbled on a peculiar difference between Solaris 10 sockets and other Linux/*NIX sockets. Example: int temp1, rc; temp1 = 16*1024*1024; /* from config, a value greater than system limit */ rc = setsockopt( sd, SOL_SOCKET, SO_RCVBUF, &temp1, sizeof(temp1); The code above will have rc == 0 on all systems - Linux, HP-UX and AIX ...

Help with Replacing Strings on Solaris

I am on a Solaris 8 box that does not support -i option for sed, so I am using the following from a google search on the topic: # find . -name cancel_submit.cgi | while read file; do > sed 's/ned.dindo.com\/confluence\/display\/CESDT\/CETS+DocTools>DOC Team/wwwin-dev.dindo.com\/Eng\/CntlSvcs\/InfoFrwk\/GblEngWWW\/Public\/index.html>EDCS...

why logadm appending NULL string while log rotation?

I want new log file copy generated and origional log to be 0 bytes and without restart of application ...it is happening but origional log file appended new data below NULL strings ...

How do I obtain only digits from a string?

Suppose I have a string like this: blah=-Xms512m I want the output as 512. I know I can get it using grep on Linux like this: echo $blah | grep -o -e [0-9]\\+ But this doesn't work on Solaris. Any nice solutions so that it's compatible on both, Linux and Solaris? Or atleast on Solaris? ...

Does libumem with mmap backend reuse anon pages for oversized allocations?

I have a program that uses Solaris' libumem memory allocator with mmap as a backend. That program does a lot of oversized (in terms of libumem slab concept) allocations. Does libumem in this situation cache oversized allocations, or are all those allocations made with fresh anon mmap() pages (and therefore initialized to zero)? ...

Issue calculating the time of the day using time()

Hello, I am writing some code to give me a history of the last commands written in a shell, including the time, in the format hour:minutes. I have the following code: // Modulo by 86400, number of seconds in a day int totalSeconds = history_time[i] % 86400; int hours = totalSeconds / 3600; int minutes = (totalSeconds % 3600) / 60; ...

execute command within command ?

i want to ask if i can execute command within command ...or use the output of the previous command as the input of the followed command : command x then command y in command y i want use output of command x ...

Why can't I build Perl modules that load Socket.so on Solaris 10?

I am trying to build Convert::ASN1 module but I get an error in the process. I am using Perl 5.12.0 on Solaris 10. perl Makefile.PL runs without trouble, same for make, but 'make test' throws this error: MOST CRUCIAL PART OF IT IMO: t/00prim.t ....... Can't load '/usr/local/lib/perl5/5.12.0/sun4-solari +s/auto/Socket /Socket.so' for mo...

How to get the major number from device file

Is there any C system call for getting the major number and minor number from a device file in solaris? ...

how i can make content of file as output of command ?

i have a file contain list of path now i want to execute command on each line example :- file name : rawabdeh command : command file contain:- path/no/1/ path/no/2/ path/no/3/ i want to do the following : command path/no/1/ command path/no/2/ command path/no/3/ ...

Can socket send / recv return errno 27 (EFBIG) on Solaris?

Can socket send / recv set errno 27 (EFBIG) on Solaris? Under which condition this happens? ...

Have python run script at X:00 am

Following up on, http://stackoverflow.com/questions/3553340/with-python-intervals-at-x00-repeat Using threading, How can I get a script to run starting at 8:00 am stop running at 5:00 pm The solution should be coded within python, and be portable tiA ...

cancel password of svn list

how i can cancel the password of svn list .... when i execute svn list it is Requests the password twice... i need to execute it without password ...

how i can make svnlook tree view just 2 level ?

how i can make svnlook tree view just 2 level ? ...

Shell Script Certification

Hi guys, I'm a UNIX shell script programmer, and I would like to know if there is any certification specific for Shell (bash, korn,etc) programmers. Could you help please? Also how about CX-310-105 exam to take Oracle Solaris Associate, does it have value on the market? Thanks ...

AIX 5.3 vs Solaris 5.10 - C strcat implementation

Does anyone have any idea of why this could happen? I have a C program in AIX 5.3, I've been asked to run it on a SPARC Solaris 10 machine, but when I did it, I noticed there was a buffer overflow with one of the many reckless strcat uses. My goal is not to sanitize the code but to provide a concrete and well founded answer of why does...

jps returns no output even when java processes are running

I'm trying to debug some issues with java processes on a Solaris box, but running jps returns no output. And jstack gives the error 'Permission denied'. The box is part of a cluster of 3 identical servers, jps and jstack work fine on the 2 other servers. I found the following forum post from someone with the same problem but no answers:...