solaris

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

两盒软妹~` 提交于 2019-12-01 12:42:41
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 from multiple threads, or do I need to add my own synchronisation primitive around mDevPoll ? Solaris 10 claims to be POSIX compliant. The write() function is not among the handful of system interfaces that POSIX permits to be non-thread-safe , so we can conclude that that on Solaris 10, it is safe in a general sense to call write() simultaneously

Install Solaris (SNV 84) DomU at Xen 3.2 CentOS 5.1 Dom0 (64 bit)

▼魔方 西西 提交于 2019-12-01 12:16:25
Thursday, March 13, 2008 Install Solaris (SNV 84) DomU at Xen 3.2 CentOS 5.1 Dom0 (64 bit) This posting is targeting cloning Mercurial Repository for Xen 3.2 on CentOS 5.1 and creating 64-bit Xen 3.2 CentOS 5.1 Dom0. To verify Dom0 functionality Solaris (Navada Build 84) has been installed as DomU. Xvnc has been set up per Sun manuals and it appeared that only CDE Desktop was functional on DomU. Gnome Desktop crashed immediately after logging in. However , that’s quite enough to perform Oracle 10g R2 installation at DomU and evaluate I/0 performance provided by new Xen Hypervisor for Solaris

Error of start of hadoop of the program:PriviledgedActionException

浪尽此生 提交于 2019-12-01 12:11:49
I wrote following program using namespace std; #include "hadoop/Pipes.hh" #include "hadoop/TemplateFactory.hh" #include "hadoop/StringUtils.hh" #include "libpq-fe.h" extern "C" { #include "traverser.h" } class IndexMap:public HadoopPipes::Mapper { public: IndexMap(HadoopPipes::TaskContext & context) { } void map(HadoopPipes::MapContext & context) { std::vector<std::string> paths = HadoopUtils::splitString(context.getInputValue(), "rn"); unsigned int k = 4; unsigned int l = 0; string concatpaths[k]; if (paths.size() % k == 0) { for (unsigned int i = 0; i < k; ++i) { concatpaths[i] = paths[l]; l

Filebeat not supported in Solaris. How to collect logs?

本秂侑毒 提交于 2019-12-01 11:42:48
问题 Our Sever is hosted in Solaris(OS) but we are not able to install Filebeat to forward the logs to desired port as Filebeat is not supported in Solaris. Can someone here suggest any way to solve this problem. Please note we are told not to install Logstash in the server hosted machine. Your advices are highly anticipated . Please do the needful. 回答1: Filebeat can easily be compiled to run on Solaris 11/amd64, but that is not an officially supported platform based on Elastic's support matrix.

need to rearrange and sum column in solaris command

て烟熏妆下的殇ゞ 提交于 2019-12-01 10:56:15
I have below data named atp.csv file Date_Time,M_ID,N_ID,Status,Desc,AMount,Type 2015-01-05 00:00:00 076,1941321748,BD9010423590206,200,Transaction Successful,2000,PRETOP 2015-01-05 00:00:00 077,1941323504,BD9010423590207,351,Transaction Successful,5000,PRETOP 2015-01-05 00:00:00 078,1941321743,BD9010423590205,200,Transaction Successful,1500,PRETOP 2015-01-05 00:00:00 391,1941323498,BD9010500000003,200,Transaction Successful,1000,PRETOP i want to count status wise using below command. cat atp.csv|awk -F',' '{print $4}'|sort|uniq -c The output is like below: 3 200 1 351 But i want to like below

Knowing the process status using procf/<pid>/status

五迷三道 提交于 2019-12-01 10:10:03
问题 I am working on Solaris. I know that if there is a process running, there is a file called /proc/<PID>/status , where <PID> is the process id, and it contains a field called state . As an example, I used my shell process: > ps PID TTY TIME CMD 18671 0:01 tcsh whose process id is 18671. I had written a simple C program for extracting that information: #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/procfs

Solaris: Programmatic interface to ifconfig?

你说的曾经没有我的故事 提交于 2019-12-01 09:34:21
I'm looking for a programmatic interface to the Solaris ifconfig(1M) command. Apparently Linux has the getifaddrs(3) command, but as far as I can tell this has not been ported to Solaris . Short of attempting to use the code at the link above , is there any way to determine ifconfig(1M) -type data (network interface presence, state, etc.) without forking the system command and parsing the output ? I have an implementation here, IPv4-only based on SIOCGIFCONF ioctl() 's and IP family agnostic version using SIOCGLIFCONF : http://code.google.com/p/openpgm/source/browse/trunk/openpgm/pgm

need to rearrange and sum column in solaris command

天涯浪子 提交于 2019-12-01 08:09:34
问题 I have below data named atp.csv file Date_Time,M_ID,N_ID,Status,Desc,AMount,Type 2015-01-05 00:00:00 076,1941321748,BD9010423590206,200,Transaction Successful,2000,PRETOP 2015-01-05 00:00:00 077,1941323504,BD9010423590207,351,Transaction Successful,5000,PRETOP 2015-01-05 00:00:00 078,1941321743,BD9010423590205,200,Transaction Successful,1500,PRETOP 2015-01-05 00:00:00 391,1941323498,BD9010500000003,200,Transaction Successful,1000,PRETOP i want to count status wise using below command. cat atp

Issues with CORBA communication

旧时模样 提交于 2019-12-01 08:07:16
This maybe too localized, but I am hoping someone can help me articulate my questions properly. So, we have a front end web server that communicates with a back end app server using CORBA. I have been asked to port the back end application to a LINUX box, which I did. But, in order to test it, I am trying to point the front end web server to the LINUX back end. We are using omniORB-4.1.4, and here is how the instance of the back end system is obtained: String args[] = new String[0]; System.out.println(getDateTime()+"Instance: Connecting to: "+initialHost+" "+initialPort+" "+enviornment+" "

Async signal safety of fork()

自闭症网瘾萝莉.ら 提交于 2019-12-01 02:52:43
问题 According to Oracle's Multithreaded Programming Guide, fork() should be safe-to-use inside signal handlers. But my process got stuck inside signal handler with to following back trace: #0 __lll_lock_wait_private () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:95 #1 0x00007f86e6a9990d in _L_lock_48 () from /lib/x86_64-linux- gnu/libc.so.6 #2 0x00007f86e6a922ec in ptmalloc_lock_all () at arena.c:242 #3 0x00007f86e6ad5e82 in __libc_fork () at ./nptl/sysdeps/unix/sysv/linux/x86_64/..