Sponsored Content
Full Discussion: Compilation
Top Forums Shell Programming and Scripting Compilation Post 302459967 by panyam on Tuesday 5th of October 2010 06:07:17 PM
Old 10-05-2010
Hi wpeckham,

Thanks for the explanation. As I said , I asked this just out of curiosity. I found that there is an utility called "shc" which can be used to compile the shell scripts.

The reason for doing the compilation is , so many users will use the same application account to login to the box and If we feel to protect our scripts being inspected/modified by some one else. I know that we can handle this by changing file permissions how ever this I can do only if the user accounts are different. As i stated since all users are using same applicationa account and we dont have any individual accounts to login to the box.So,I just thought it might be a worth to keep only the compiled copies in the directory needed.

Appreciate all for your valuable thoughts on this.

Regards
Ravi Sastry P
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Kernel compilation

I have re-compiled kernel source code available in /usr/src/linux.2.4.20 with "make" command. The compilation is succesful. Now the problem is create the image for this. The documentation in the same folder says that now you have compile "make image". There is no option for image in Makefile. ... (3 Replies)
Discussion started by: mankrish
3 Replies

2. Solaris

compilation problem

I am compiling a software named wine When i run make then at the end following error generated. DVAPI32_ -foversion.res version.rc ld.so.1: ../../tools/wrc/wrc: fatal: relocation error: file ../../tools/wrc/wrc: symbol wine_casemap_upper: referenced symbol not found *** Signal 9 make:... (0 Replies)
Discussion started by: mansoorulhaq
0 Replies

3. Programming

Compilation error

I am compiling a software xchm on solaris 10. First i run './configure' There is no error. But when i start compiling using 'gmake' following error shown /usr/local/include/wx-2.6/wx/x11/brush.h: In copy constructor `wxBrush::wxBrush(const wxBrush&)':... (3 Replies)
Discussion started by: mansoorulhaq
3 Replies

4. Programming

compilation problem

i have a class name 1.c in tht i am using function n wich has his body in 2.c and declaration in 2.h now how can i compile 1.c. ex; 1.c int main() { //some data n(10); //somedata } ***** 2.c int n(int k) { //some data } int main() { some data (2 Replies)
Discussion started by: phani_sree
2 Replies

5. Programming

c compilation process

What is symbol table? (1 Reply)
Discussion started by: rangaswamy
1 Replies

6. Linux

c++ compilation error

Hello every one, here i am attempting to compile a c++ module using gcc.it is throwing a error . error: ==== > make -S dummyCHARGP /usr/local/bin/gcc -g -DDEBUG -DMAT -I. -I/swtemp/usbs/cc/unix-ce/root/subsys/lib/Linux/ -I/opt/dce/include -I/opt/dce/include/dce ... (12 Replies)
Discussion started by: mannam srinivas
12 Replies

7. UNIX for Dummies Questions & Answers

Compilation

Hi All, We have a C program existing in one of the folders which I have to modify a lil bit, When I'm trying to compile the program using GCC or CC command its showing as ksh: gcc: not found is that mean there is no compiler or do I have to verify for something, please advice Thank... (2 Replies)
Discussion started by: diggermf
2 Replies

8. Programming

C Compilation problem

Dear all I am new to C programming In response to the post cat get_time.c #include <stdlib.h> #include <sys/time.h> main() { struct timeval tv; struct timezone tz; struct tm *tm; gettimeofday(&tv, &tz); tm=localtime(&tv.tv_sec); printf("... (2 Replies)
Discussion started by: on9west
2 Replies

9. AIX

Problem in compilation.

Hi, I am executing the below mentioned code:- proc SQLCHECK=SEMANTICS iname=CDBInteractor.pc parse=none code=cpp cpp_suffix=cpp g++ -c main.cpp g++ -o pre_request_engine main.o -I/oracle/oracle/app/product/10g/precomp -L/oracle/oracle/app/product/10g/lib32 -lnsl -ldl And... (2 Replies)
Discussion started by: tushar_tus
2 Replies

10. AIX

VIM compilation

Hi, I tried to compile vim on AIX OS. I tried all version from 6.4 to 7.2 and the effect is the same. ./configuration --prefix=/home/me OK make The make try to compile first file buffer.c ane it gived me message like this gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_ATHENA ... (2 Replies)
Discussion started by: marcintom.aviva
2 Replies
Sys::Statistics::Linux::Compilation(3pm)		User Contributed Perl Documentation		  Sys::Statistics::Linux::Compilation(3pm)

NAME
Sys::Statistics::Linux::Compilation - Statistics compilation. SYNOPSIS
use Sys::Statistics::Linux; my $lxs = Sys::Statistics::Linux->new( loadavg => 1 ); my $stat = $lxs->get; foreach my $key ($stat->loadavg) { print $key, " ", $stat->loadavg($key), " "; } # or use Sys::Statistics::Linux::LoadAVG; use Sys::Statistics::Linux::Compilation; my $lxs = Sys::Statistics::Linux::LoadAVG->new(); my $load = $lxs->get; my $stat = Sys::Statistics::Linux::Compilation->new({ loadavg => $load }); foreach my $key ($stat->loadavg) { print $key, " ", $stat->loadavg($key), " "; } # or foreach my $key ($stat->loadavg) { print $key, " ", $stat->loadavg->{$key}, " "; } DESCRIPTION
This module provides different methods to access and filter the statistics compilation. METHODS
new() Create a new "Sys::Statistics::Linux::Compilation" object. This creator is only useful if you don't call "get()" of "Sys::Statistics::Linux". You can create a new object with: my $lxs = Sys::Statistics::Linux::LoadAVG->new(); my $load = $lxs->get; my $stat = Sys::Statistics::Linux::Compilation->new({ loadavg => $load }); Statistic methods sysinfo() cpustats() procstats() memstats() pgswstats() netstats() netinfo() "netinfo()" provides raw data - no deltas. sockstats() diskstats() diskusage() loadavg() filestats() processes() All methods returns the statistics as a hash reference in scalar context. In list all methods returns the first level keys of the statistics. Example: my $net = $stat->netstats; # netstats as a hash reference my @dev = $stat->netstats; # the devices eth0, eth1, ... my $eth0 = $stat->netstats('eth0'); # eth0 statistics as a hash reference my @keys = $stat->netstats('eth0'); # the statistic keys my @vals = $stat->netstats('eth0', @keys); # the values for the passed device and @keys my $val = $stat->netstats('eth0', $key); # the value for the passed device and key Sorted ... my @dev = sort $stat->netstats; my @keys = sort $stat->netstats('eth0'); pstop() This method is looking for top processes and returns a sorted list of PIDs as an array or array reference depending on the context. It expected two values: a key name and the number of top processes to return. As example you want to get the top 5 processes with the highest cpu usage: my @top5 = $stat->pstop( ttime => 5 ); # or as a reference my $top5 = $stat->pstop( ttime => 5 ); If you want to get all processes: my @top_all = $stat->pstop( ttime => $FALSE ); # or just my @top_all = $stat->pstop( 'ttime' ); search(), psfind() Both methods provides a simple scan engine to find special statistics. Both methods except a filter as a hash reference. It's possible to pass the statistics as second argument if the data is not stored in the object. The method "search()" scans for statistics and rebuilds the hash tree until that keys that matched your filter and returns the hits as a hash reference. my $hits = $stat->search({ processes => { cmd => qr/[su]/, owner => qr/root/ }, cpustats => { idle => 'lt:10', iowait => 'gt:10' }, diskusage => { '/dev/sda1' => { usageper => 'gt:80' } } }); This would return the following matches: * processes with the command "[su]" * processes with the owner "root" * all cpu where "idle" is less than 50 * all cpu where "iowait" is grather than 10 * only disk '/dev/sda1' if "usageper" is grather than 80 The method "psfind()" scans for processes only and returns a array reference with all process IDs that matched the filter. Example: my $pids = $stat->psfind({ cmd => qr/init/, owner => 'eq:apache' }); This would return the following process ids: * processes that matched the command "init" * processes with the owner "apache" There are different match operators available: gt - grather than lt - less than eq - is equal ne - is not equal Notation examples: gt:50 lt:50 eq:50 ne:50 Both argumnents have to be set as a hash reference. Note: the operators < > = ! are not available any more. It's possible that in further releases could be different changes for "search()" and "psfind()". So please take a look to the documentation if you use it. EXPORTS
No exports. TODOS
* Are there any wishs from your side? Send me a mail! REPORTING BUGS
Please report all bugs to <jschulz.cpan(at)bloonix.de>. AUTHOR
Jonny Schulz <jschulz.cpan(at)bloonix.de>. Thanks to Moritz Lenz for his suggestion for the name of this module. COPYRIGHT
Copyright (c) 2006, 2007 by Jonny Schulz. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-03-09 Sys::Statistics::Linux::Compilation(3pm)
All times are GMT -4. The time now is 06:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy