solaris

jstack equavalent in C++

Hi, jstack is very helpful to me in checking stack traces of live running processes. Is there any tool in C++ to do this task. I am working with Solaris/GCC compilers. Actually GDB/DBX can do that. But my process is hanging some times that to very rarely. So when that is hanging I want to know where it is going wrong. Just track that ...

Get the path of link that it points to?

Is it possible to get the abolute path of the link that it is pointing to? Is there any simple system command? I need for all of the following OS HP-UX 11i, 1123u, 1123i AIX 5.2 and 5.3 Suse Linux 10 Solaris 10 ...

Can java call a script to restart java in solaris?

We have a jboss application server running a webapp. We need to implement a "restart" button somewhere in the UI that causes the entire application server to restart. Our naive implementation was to call our /etc/init.d script with the restart command. This shuts down our application server then restarts it. However, it appears that ...

Patching Sun Solaris

Hi recently we have an application issue which requires patching of sun solaris. Problem is that there are many zones created in this solaris server which are used by other applications. So if it is possible that certain patches could affect the current applications. What is the best way to handle this kind of situation? ...

Is the const value parameter in definition but not declaration really C++?

This is similar to (but different from) this question. Here is some simple test code to illustrate some weridness I have discovered with Sun CC: //---------------main.cpp #include "wtc.hpp" int main(int, char**) { testy t; t.lame(99); return 0; } //--------------wtc.hpp #ifndef WTC_HPP_INCLUDED #define WTC_HPP_INCLUDED class te...

Accents in file name using Java on Solaris

I have a problem where I can't write files with accents in the file name on Solaris. Given following code public static void main(String[] args) { System.out.println("Charset = "+ Charset.defaultCharset().toString()); System.out.println("testéörtkuoë"); FileWriter fw = null; try { fw = new FileWriter("testéörtk...

help on version-control for legacy code.

I'm looking for some kind of backup/version-control method for a legacy system: Systems are developed in a version of BASIC. It's an interpreted version. Programs are saved in some pseudo-code; not pure text. All production programs are stored in the same folder tree, divided into folders depending on the category. No subversion stra...

thread performance on Linux vs. Solaris

This Linux Magazine article http://www.linux-mag.com/id/792 explains the difference in the way threads are implemented in Linux as compared to commercial Unixs such as Solaris. In summary, Linux uses a 1-to-1 mapping of user threads to kernel threads, while Solaris uses a many to many mapping. The article implies that this might give Sol...

How do I refer to a global variable in a dynamically linked library?

The environment is Solaris on 32bit SPARC, but I think this is a more general issue with dynamic linking and/or position independent code. I have an assembly program that I compile as position independent code and dynamically link to it from a C program. It works fine, except that I can't refer to any memory reserved by the assembly pro...

OpenSolaris: Remove user from a group from command line

How can I remove a user from a group from the command line in OpenSolaris (2008.11)? I know I can define a user's primary group and a add a user to a group with: usermod -g primarygroup user usermod -G group_list user What's the corresponding command to undo that action and remove a user from the group without just editing /etc/group...

Unresolved symbols when compiling with gcc on OpenSolaris 2008.11

When compiling a simple Netbeans C project that uses sockets I get the following output. I supose the problem is that gcc is not properly linking sockets.h library. Need a foolprof method to solve this. Thanks i advance Running "/usr/bin/make -f Makefile CONF=Debug clean" in /export/home/manu/Escritorio/TP-entrega 2/Application_1 /usr...

Will mmap use continuous memory? (on solaris)

I used mmap(just try to understand how mmap works) to allocate 96k anonymous memory, but looks like it split the 96k into 64k and 32k. But when allocate 960k, it allocate only one chunk whose size is 960k. When solaris will split the allocate mem into several part? Code: #define PROT PROT_READ | PROT_WRITE #define MAP MAP_ANON | MAP_P...

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 would like to avoid having to fork to these tools. Is there someplace similar to /proc/$pi...

will mmap use user cpu instead of whole sys cpu? (solaris)

when use mmap to allocate some anonymous mem, we often set the start address as 0/null so mmap will figure out the starting address by itself. And to get the start address, it will work thought the whole virtual memory space to find a hole which could put the chuck of mem to be allocated. I guess this is calculated as user cpu instead of...

high sys cpu and high ithr in pmap on solaris

I have a mysql database running on solaris, from mpstat, I could see a thread has very high ithr and high sys cpu. How can I find where the ithr comes from and why the sys cpu is relatively high? CPU minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr sys wt idl 0 0 0 0 440 146 269 1 17 52 0 833 0 ...

How to debug JNI/C library?

Hi, We have system here that uses Java JNI to call a function in a C library. Everything running on Solaris. I have a problem somewhere with string encoding. An arabic character is returned by the function written in C, but the JNI methods receives a string with another encoding. I already tried setting $NLS_LANG, and the vm parameter ...

Setting java to use one cpu

I have an application that has a license for a set number of cpus and I want to be able to set the number of cpus that java runs in to 1 before the check is done. I am running Solaris and have looked at pbind but thought that if I started the application and then used pbind it would have checked the license before it had set the number o...

Installing/configuring gdbm Python module for cvs2svn?

I am trying to install cvs2svn on a Solaris 10 machine. It has Python 2.4.4 on it. I don't have root access. When I downloaded cvs2svn and tried to run it, it said ERROR: cvs2svn uses the anydbm package, which depends on lower level dbm libraries. Your system has dbm, with which cvs2svn is known to have problems. To use cvs2svn, you mus...

What caused the "Fatal error in ccfe" compilation error in the Solaris C++ compiler?

I got this error message from the C++ compiler: CC: Fatal error in ccfe: Segmentation Fault (core dumped) What could cause it? ...

How can I measure my (SAMP) server's bandwidth usage?

I'm running a Solaris server to serve PHP through Apache. What tools can I use to measure the bandwidth my server is currently using? I use Google analytics to measure traffic, but as far as I know, it ignores file size. I have a rough idea of the average size of the pages I serve, and can do a back-of-the-envelope calculation of my band...