Questions tagged [solaris]

Solaris is a commercial Unix operating system sold by Oracle, previously (before 2010) from Sun Microsystems. It can run on SPARC or x86 hardware.

Solaris is a Unix operating system originally developed by Sun Microsystems as a successor to SunOS. Oracle Solaris, as it is now known, has been owned by Oracle Corporation since Oracle's acquisition of Sun in January 2010. OpenSolaris (the open-source version of Solaris) was abandoned at that point.

Solaris is known for its scalability, especially on SPARC systems (), and for originating many innovative features such as DTrace, ZFS and Time Slider. Solaris supports SPARC-based and x86-based workstations and servers from Sun and other vendors.

Resources

2780 questions
12
votes
1 answer

Tool for Library Dependency

I'm looking for the tool/command on Unix platform to detect the library dependencies of the .so and .o files. I have already used the ldd/nm/truss, but I don't know the proper approach to detect library dependencies.
Abinash Bishoyi
  • 187
  • 1
  • 2
  • 13
11
votes
4 answers

Is there a way to know which compiler generated a static library?

A third party provided me a static lib (.a) to link with on solaris station. I tried to compile with sunpro, and failed at link step. I suppose the issue is coming from the compiler I use (gcc instead?) or simply its version (as the std lib provided…
yves Baumes
  • 8,836
  • 7
  • 45
  • 74
11
votes
8 answers

Getting around truncated "ps"

I'm trying to write a script that will find a particular process based on a keyword, extract the PID, then kill it using the found PID. The problem I'm having in Solaris is that, because the "ps" results are truncated, the search based on the…
julian
  • 378
  • 2
  • 7
  • 19
11
votes
4 answers

sed -i option is not working on solaris

I am using sed to replace a line with NULL in a file. The command i used is sed -i "s/.*shayam.*//g" FILE This is working fine in linux. shayam is replaced with blank in the FILE. But when i used this in solaris it is showing some error. sed:…
Raj
  • 757
  • 4
  • 11
  • 22
11
votes
4 answers

Can I execute nested or chained commands in UNIX shell?

Can I execute command within another command in UNIX shells? If impossible, can I use the output of the previous command as the input of next command, as in: command x then command y, where in command y I want use the output of command x?
Osama Ahmad
  • 805
  • 4
  • 12
  • 18
11
votes
4 answers

Minimizing Java Thread Context Switching Overhead

I have a Java application running on Sun 1.6 32-bit VM/Solaris 10 (x86)/Nahelem 8-core(2 threads per core). A specific usecase in the application is to respond to some external message. In my performance test environment, when I prepare and send…
Binil Thomas
  • 13,699
  • 10
  • 57
  • 70
11
votes
1 answer

C++ preprocessor removes whitespace in calls to variadic macros (Solaris Studio 12.3)

The C++ preprocessor of Oracle Solaris Studio 12.3 removes whitespace completely when expanding __VA_ARGS__. Can anybody confirm this behaviour on their system? Is it a known compiler bug? Are there any workarounds for this problem? To illustrate,…
Claudio
  • 3,089
  • 2
  • 18
  • 22
11
votes
6 answers

Makefile error: Unexpected end of line seen

Trying to install Git, I ran configure and make, but got the following error message: make: Fatal error in reader: Makefile, line 221: Unexpected end of line seen The Makefile looks like: 218: GIT-VERSION-FILE: FORCE 219: …
Winston C. Yang
  • 1,497
  • 2
  • 18
  • 27
10
votes
0 answers

Tee does not exit after pipeline it's on has finished

So, I've got a rather long and involved script intended to be used by people who aren't going to want to dig into anything that goes wrong. Recently, during testing, the script froze inexplicably. Long story short, I executed a command in a…
qkslvrwolf
  • 179
  • 2
  • 10
10
votes
2 answers

Is write() safe to be called from multiple threads simultaneously?

Assuming I have opened dev/poll as mDevPoll, is it safe for me to call code like this struct pollfd tmp_pfd; tmp_pfd.fd = fd; tmp_pfd.events = POLLIN; // Write pollfd to /dev/poll write(mDevPoll, &tmp_pfd, sizeof(struct pollfd)); ...simultaneously…
Wad
  • 1,454
  • 1
  • 16
  • 33
10
votes
3 answers

What's the Solaris equivalent to the BSD's 'tail -n100'?

I've looked this up a thousand times, and I always forget it, so, here for eternity: Solaris has a bit of an awkward syntax for tail. How do I do the equivalent of BSD's tail -nN? What I want are the last N lines from tail's input.
kch
  • 77,385
  • 46
  • 136
  • 148
10
votes
2 answers

replacement for cut --output-delimiter

I created a script that was using cut -d',' -f- --output-delimiter=$'\n' to add a newline for each command separated value in RHEL 5, for e.g. [root]# var="hi,hello how,are you,doing" [root]# echo $var hi,hello how,are you,doing [root]# echo…
Marcos
  • 845
  • 3
  • 10
  • 21
10
votes
12 answers

Too many open file handles

I'm working on a huge legacy Java application, with a lot of handwritten stuff, which nowadays you'd let a framework handle. The problem I'm facing right now is that we are running out of file handles on our Solaris Server. I'd like to know what's…
dlinsin
  • 19,249
  • 13
  • 42
  • 53
10
votes
2 answers

Pipe the output from three echo statement to mail

echo "Total items: `echo $QUERY1 | awk '{print $1}'`" echo "Total Error: `echo $QUERY1 | awk '{print $2}'`" echo "Percentage: $QUERY2" How can I send these three things in a single email using mail command. So the mail body should be like this…
AKIWEB
  • 19,008
  • 67
  • 180
  • 294
9
votes
6 answers

How to tie a network connection to a PID without using lsof or netstat?

Is there a way to tie a network connection to a PID (process ID) without forking to lsof or netstat? Currently lsof is being used to poll what connections belong which process ID. However lsof or netstat can be quite expensive on a busy host and…
jac_no_k
  • 237
  • 3
  • 4
  • 7