solaris

Scanning the log files for last 30 minutes of data

吃可爱长大的小学妹 提交于 2019-12-12 03:17:29
问题 I have to write a shell/perl script to scan a log file for last 30 mins worth Data. The requirement is to schedule this script in Cron to run every 30 minutes and look for a error string. OS: Solaris Shell:Bash I have tried below script, but it has become too long and clumsy, do we have other way to make it a bit shorter? blogs=/opt/docs/datapower/prod/business.log slogs=/opt/docs/datapower/prod/system.log starttime=$(date +'%H') currmin=$(date +'%M') curdate=`date|cut -d' ' -f5` echo $(date)

GCC Compiles fine but Solaris Compiler doesn't?

那年仲夏 提交于 2019-12-12 03:02:54
问题 source: svn checkout svn://dev.exiv2.org/svn/trunk (rev: 3019) My platform: Fedora 17 64-bit The following command works: ./configure CXX=/opt/oracle/solarisstudio12.3/bin/CC \ CC=/opt/oracle/solarisstudio12.3/bin/cc CXXFLAGS="-v -library=stlport4" But when I do make, I get the error: libtool: compile: /opt/oracle/solarisstudio12.3/bin/CC -v -library=stlport4 - xldscope=hidden -I. -DEXV_LOCALEDIR=\"/usr/local/share/locale\" -I../include -funsigned- char -DNDEBUG=1 -DEXV_HAVE_STDINT_H=1 -c XML

Need info on “set endian” on solaris machine

五迷三道 提交于 2019-12-12 02:25:26
问题 Can any 1 please tell or show the difference in the behaviour of any program before and after I "set endian little" in gdb on solaris machine? I want to know the effect of changing it. Thanks! 回答1: You should never have to set endianness when doing native (as opposed to remote) debugging. You can however observe the ill effects of doing that: (This is on Linux/x86 machine, but I expect you'll get similar results on Solaris/x86 and Solaris/SPARC). int main() { int x = 0x1020304; return x; }

Access SQL Server from Solaris

孤人 提交于 2019-12-12 01:18:21
问题 I found out about the freeTDS which can be used here, but there are doubts about its stability in the production environment. Is there any other way to interactive with MSSQL Server from Solaris besides using ODBC driver? 回答1: Don't know of any other way. We're using unixODBC + freeTDS + DBD::Sybase in a production environment. It can be fiddly setting it up, but we have no problems with stability. It is possible to use FreeTDS directly and bypass unixODBC. 来源: https://stackoverflow.com

GLIBC Configuration Error on Solaris

陌路散爱 提交于 2019-12-11 23:31:40
问题 Recently I had to work with glibc to be installed on Solaris OS on the x86 platform. The problem I encountered with was the configuration of the glibc package. I was getting multiple errors.Some of them have been higlighted under: configure:3641: g++ -c -g -O2 conftest.cc >&5 conftest.cc:10:31: error: 'void std::exit(int)' should have been declared inside 'std' configure:3647: $? = 1 To be noted I am using glibc-2.3.5. I could only find out that the glibc ports have not been developed for

bash - The Best Elegant way to disable log file

最后都变了- 提交于 2019-12-11 22:26:57
问题 dear friends and colleges the following code , is the basic concept of my log file in my bash script this Code help me to understand each step in my bash script or in case we need to make troubleshooting but some times I want to disable the Log creation because we not need the log and want to make the script more efficiency ( call to Log function each line in the script take time and make the script more heavy ) so my question my friends: What the best elegant way to disable the log file?

awk command to print last 5 rows if matched

烂漫一生 提交于 2019-12-11 19:59:07
问题 I have an xml file. I need to print five lines before the matched text. There may be multiple matches. I am using following awk command which is returning only one row. awk '/<\/ABC>/' file.xml returns <ABC>Some Text1</ABC> <ABC>Some Text2</ABC> <ABC>Some Text3</ABC> Expected: ... previous 4 lines ... <ABC>Some Text1</ABC> ... previous 4 lines ... <ABC>Some Text2</ABC> ... previous 4 lines ... <ABC>Some Text3</ABC> Cannot use grep -B as per in Solaris: grep: illegal option -- B grep: illegal

Parent trying to read children exit status (or return value), fork and wait

夙愿已清 提交于 2019-12-11 19:09:12
问题 I'm confused. Supposedly, basing on man, and many other sources, like this: Return code when OS kills your process wait(&status) should make it possible for me to get the exit status or return value of a child process? Those 2 snippets of code, should allow me to see the exit value of it's child, and then print it. child process function: int childFunction(char in[],char logPath[]){ FILE *logFile= fopen( logPath, "a" ); if(logFile==NULL) return 1; int c=system(in); fclose(logFile); return(c);

Application Control Scripts on Unix

ⅰ亾dé卋堺 提交于 2019-12-11 17:55:06
问题 I'm looking for some software that allows me to control a server based application, that is, there are bunch of interdependent processes that I'd like to be able to start up, shut down and monitor in a controller manner. I've come across programs like Autosys, but that's expensive and very much over the top for what I want. I've also seen AppCtl, but that seems not to handle dependencies. Maybe it would be possible to repurpose the init scripts? Oh, and as an added complication it should be

OCIError on 'require'; permissions issue?

懵懂的女人 提交于 2019-12-11 17:42:58
问题 I've just recently started learning/using Ruby at work. I've got a super-simple test script that just connects to our Oracle 10g database, runs a select, and 'puts' the results to the screen. This is on a Solaris 10 server. If I run the script as the 'apps' user (the system user that runs our automated scripts), the script runs fines. If I run it as myself, it throws an error: oci8lib.c:98:in oci8lib.so: OCI Library Initialization Error (OCIError) from /usr/local/lib/ruby/site_ruby/1.8/oci8