solaris

Solaris 10 /bin/sh forks on indirection

I have noticed that Solaris 10's Bourne shell, /bin/sh (and also /sbin/sh) forks a subshell when using indirection (<). I have tried a pile of other Bourne-ish shells, including: The POSIX /usr/xpg4/bin/sh shell on Solaris 10 /bin/bash, /bin/ksh on Solaris 10 /bin/sh on AIX 5 /bin/sh on Debian Linux 5 and none of these exhibit this b...

How to profile application running in Tomcat 6 on Solaris 10 Sparc Server ?

My J2EE based application running in Tomcat 6 on Solaris 10 sparc server is very very slow. It works fine on Linux servers. I am using flex as web front end to my application. I need to know how can I configure and run it using any java profiler on Sun Solaris server. ...

How can I determine actual file size on disk using Perl?

I am scanning a file system and wish to determine the allocated size of a file on disk. Using stat() I can get the file size as ( stat(_) )[7] , the blocks allocated on disk can be obtained from ( stat(_) )[12], and the "preferred block size for file system I/O" is ( stat(_) )[11]. If I merely multiply stat column 11 and 12, however, ...

Solaris OS latest version for i386

I am running following solaris OS on I386 processors: $ uname -a SunOS oobleck 5.10 Generic_127128-11 i86pc i386 i86pc $ CC -V CC: Sun C++ 5.8 Patch 121018-11 2007/05/02 I checked on Oracle's web page and it seems that there latest version is Solaris 10 http://www.sun.com/software/solaris/releases.jsp The instruction set is: $ isainf...

Is there a transparent way to force 64-bit gcc compilation on Solaris

Is there a way to force '-m64' not overriding CXXFLAGS/CFLAGS. I want automatic x64 build environment like in Linux/BSD amd64. Why do I need this? The problem is complexity of the project I need to be buit as x64 on Solaris. It contains several parts and each may use specific C/C++ compiler flags. So, I can't just run: CXXFLAGS=-m64 ...

Problem with directory spacing when copying files

I trying to copy a file from a directory to another directory in solaris. DIR1="/u01/home files" DIR2="/u01/other files" cp $DIR1/test.txt $DIR2 cp: cannot access /u01/home cp: cannot access files. How do i resolves this error other than renaming the DIR1 not to have spacing? ...

Solaris process taking up large CPU

I have a java process seens like taking up all the cpu processing power. I thinking of killing it but how do i know what is the program that is actually causing such huge usage of solarsi cpu usage? ...

UNIX programming

Hi i want to convert UNIX date to normal date (YYYY-MM-DD) 22222,0,0,0,14387 33333,0,0,0,14170 44444,0,0,0,14244 55555,0,0,0,14190 66666,0,0,0,14528 77777,0,0,0,14200 88888,0,0,0,0 99999,0,0,0,0 here 5th column represents UNIX date i want to convert into 22222,0,0,0,2009-05-23 and similarly remaining rows can any body help me ...

ifdef & solaris

Hi I want to undefine variable when compiling on SunOS. Therefore, i tried to put #ifdef SunOS #undef FOO #endif but it does not work. The problem is in #ifdef sunos ? Should i declarate it, or complier do it by itself ? regards S. ...

Solaris dev/random

Hallo, Which algorithm implements dev/random of Solaris? Is taht Yarrow-160 or Yarrow-256 or is the algorithm the same as in Linux? Is there documentation / link ? I have already looked a lot, but I couldn't find it. Thanks in advance. ...

profiling in solaris

Can anyone suggest a good tool to profile a program compiled with SunCC compiler. Also please suggest a good equivalent of valgrind for the same. ...

Building subversion 1.6.12 - make: *** [subversion/libsvn_subr/libsvn_subr-1.la] Error 1 - Solaris 10 Sparc

I get the following while trying to compile subversion 1.6.12 from source on Solaris 5.10 SPARC platform. I only need the svn client program on this machine so no need for Apache, Neon or Swig. My configure: $ ./configure --without-berkeley-db --with-zlib=/usr --without-sasl --disable-nls --with-apr=/usr/local/apr --with-apr-util=/usr/...

Strangeness using /usr/xpg4/bin/tr and /usr/bin/tr on Solaris 9

Hi all, I have a file looking like this, "xxxxxx" "yyyyyy" "aaaaaa" "cccccc" "bbbbbb" "eeeeee" "oooooo" "zzzzzz" Wanting to replace each \n in this file I use: tr '\n' ',' < INPUT > OUTPUT Which works fine. The output is to be expected: "xxxxxx","yyyyyy","aaaaaa","cccccc".... However I can't do any manipulation using sed or aw...

Generate 12 Digit HEX number in KSH

Hi all, I need to generate 12 digit Hex numbers in KSH on Solaris Thanks ...

grep -v and -B|-A|-C not working together

I need to scan the output of iostat -En on a Solaris machine such that when a disk with errors is found, two lines about that disk are sent to the final output. This works fine so far using iostat -En | grep 'Errors: [1-9]' -A 1 but when I try to not include CD/DVD devices, I hit a wall. The contaxt flags (-A|B|C) don't seem to work w...

strftime/strptime problem

I've written a function to convert datetimes from one format to another - int convertDateTime(char* source_fmt,char* dest_fmt,char* source,char* dest) { struct tm tmpptr; if (strptime(source,source_fmt, return -1; } strftime(dest,100,dest_fmt, return 0; } It works fine for most...

How to find a solaris process with ___ status

I made the following script which searches for certain processes, displays uses pflags for each one, and stops when it finds one with the word "pause": !cat find_pause #!/usr/bin/perl -W use warnings; use strict; if (open(WCF, "ps -ef | grep '/transfile' | cut -c10-15 | xargs -n1 pflags 2>&1 |" )) { while (<WCF>) { ...

Which Java library for creating Solaris pkg software packages?

Which Java library are people using to create Solaris pkg software packages? We are developing an application that has, as one if its features, the ability to bundle backend services as a pkg software package which can be easily installed in Solaris. I am hoping that there is a Java library that makes building pkg's a painless process. ...

What is an OpenSolaris syscall calling convention (x86)?

What is an OpenSolaris syscall calling convention (x86)? F.e. I'd like to write a program in 32bit assembly which displays a string to the console. For this I'd like to use "write" syscall (no. 4). C definition for write is: ssize_t write(int fildes, const void *buf, size_t nbyte) what registers should hold fildes, buf and nbyte argu...

expect command - Unix

Hi, I am using 'expect' to automate ssh password authentication. When I run the script in SunOS, I find the spawned ssh process gets killed once the below script is completed. This is not the case in Linux. How do we avoid it? Should we ignore the SIGCHLD signal somehow? Is there anyway to determine through this script if spawned proces...