solaris

How to fix memory access error

Hi, I am working on a migration project, here we are migrating large set of C++ libraries from Mainframe to Solaris. We have complted migration sucessfully, but while running the application, some places it crashes with 'signal SEGV (no mapping at the fault address)'. Since the application supports on windows also, we checked with pur...

ZFS vdev naming?

I have no idea what is the rationale behind naming the vdev (virtual devices) used while creating zfs pools in Solaris. Suppose, I have a disk c4d0, what is meant by c4d0p0 and c4d0s0? And, how would I know what to use with ZFS commands. I am terribly confused since I keep getting "invalid vdev specified". Any pointers? ...

Debugging Solaris OS crash

I have access to a remote Solaris terminal which crashes occasionally, and I have to ask someone with physical access to boot the machine up, which it does successfully. I would like to know which tools/files should I look at to find out the cause of the crash so that I can make the necessary configuration changes and avoid it in the fut...

Fixing the timezone on Solaris 10

I have no ideas how to fix this. In my /etc/TIMEZONE file the TZ variable has the correct value (Canada/Eastern) and still it's showing a -1 hour lag. Where else should I be looking? ...

How to change the Keyboard layout on Solaris.

Hi, I am running a machine with SunOS and NO graphical enviroment. Does someone know how to change the keyboard layout from the console?? Thanks ...

How to get process info programmatically in C/C++ from a Solaris system?

Is there a C/C++ library, and documentation about how to collect system and process information on Solaris? Although I could parse command-line tools, I'd rather use a library that makes the task easier to do. Thanks Edit: It has been suggested to use the /proc virtual directory to collect information, however its not much better than...

Warnings and SunStudio C++ compiler

I talked my team into turning on compiler warnings again. Some how all warnings (-w) were disabled (don't ask...). Most of them are obvious but one of them is really annoying. I get it from my date and time classes which are used in lots of places. Story is really simple. Time is subclass of Date and both of them have their operators def...

How to discover the machine type?

Hi, I would like to discover the machine architecture type of a big number of machines. I have the hostname of each machine. The machines have Debian 4 linux, SunOS 9, SunOS 10 or Apple Darwin. All are unix-like, but with minor differences. I would like to know: - architecture (x86, x86_64, ia64, sparc, powerpc...) - processor type (in...

Relation between Opensolaris source and Solaris releases

The source code available for OpenSolaris is very useful for finding out about the internals of Solaris (together with dtrace and mdb). However, as far as I know there is no way of finding out exactly how the OpenSolaris source code relates to the binaries released as formal update releases of Solaris. I.e. which versions of the source f...

Simplest and most frugal way to get "make" for Solaris 10

My current project involves writing perl code inside a Solaris VMWare appliance (hosted on a Mac). In order to use the CPAN, I need to install a version of "make" inside the VM. What is the most frugal apprach (disk space and download capacity are limited) to do this? EDIT: turns out I have a Solaris 10, after all.         Timo Geus...

I am a long time Ubuntu Linux user (a developer), what are the benefits of using Open Solaris

I am a web developer (J2EE application developer) and just want to expand what tools I use. I want to use Open Solaris for my personal projects. I have nothing against Linux and It looks like a lot of the same tools are on both systems. Have you jumped to Solaris, was it a good experience? ...

Trying to get vncserver running on solaris: Fatal server error: could not open default font 'fixed'

I've looked at all the webpages and there are some good suggestions, but none has worked for me. Solaris sparc box, SunOS 5.10 Generic_120011-14 sun4u sparc SUNW,UltraAX-i2 The machine has openwin installed with symlinks from all of the usual X11 directories. xfs is running and all the font directories are there, I ran mkfontdir and f...

ssh and window ids

I have a project to do in school which is baffeling me... I am SSHing into a Solaris computer in the computer lab from my own Debian box via ssh -Y name@***.cs.<school> I can get in just fine, and the X11 seems to be working also. However, this peticular project requires us to find the window id of a netscape window via xwininfo and...

Is there a way to read environment variables of other processes using Perl and in a Linux or Solaris environment?

In Perl, I need to read the environment of other processes. The script is running with root privileges. The script will be running in both Linux and Solaris. I would like a solution that's mostly platform agnostic, at least between Linux and Solaris. In Linux, examining the /env/<proc_id>/environ can get me the answer. I would like ...

fopen in C on solaris

I've been trying to get this code to work for hours! All I need to do is open a file to see if it is real and readable. I'm new to C so I'm sure there is something stupid I'm missing. Here is the code (shorthand, but copied): #include <stdio.h> main() { char fpath[200]; char file = "/test/file.this"; sprintf(fpath,"~cs43...

How can I determine a process' unshared memory size on SunOS?

Is there a way to determine the unshared memory size of a process on SunOS? Specifically the size of a child httpd process running under mod_perl if that helps. ...

Map sd?/sdd? names to Solaris disk names?

Some commands in Solaris (such as iostat) report disk related information using disk names such as sd0 or sdd2. Is there a consistent way to map these names back to the standard /dev/dsk/c?t?d?s? disk names in Solaris? Edit: As Amit points out, iostat -n produces device names such as eg c0t0d0s0 instead of sd0. But how do I found out th...

Can someone explain this definition of the 'dirent' struct in Solaris?

Recently I was looking at the 'dirent' structure (in dirent.h) and was a little puzzled by its definition. NOTE: This header file is from a Solaris machine at my school. typedef struct dirent { ino_t d_ino; off_t d_off; unsigned short d_reclen; char d_name[1]; } dirent_t; Particularly the d_name field. How would t...

How to detect that arrow key is pressed using C under Linux or Solaris?

What is the best way to detect in a C program that arrow key is pressed under Linux or Solaris? As I know there is no standard C function that can do it. I don't want to use int86 function. I need to do it in a portable way. Edit: I am asking about console applications. ...

How can I create a portable perl when I can't install modules on the target host?

I need to run Perl applications I develop on cygwin Windows on HP unix / Solaris hosts. I am not a superuser on the unix machines and I can't touch the default Perl module location nor can I install modules to the default Perl module location. Also the unix installation lacks most basic modules and I can't change that. For example, I ha...