beginners-help@perl.org



Hi all

I want to assign the each column of the following file in a separate
variable.

2864 oracle 0.0
0.2/home/oracle/u01/app/oracle/product/10.2.0/db_1/inventory/bin/tnslsnr
LISTENER -inherit
2872 oracle 0.0 0.6 ora_pmon_orcl
2874 oracle 0.0 0.5 ora_psp0_orcl
2876 oracle 0.0 1.2 ora_mman_orcl
2878 oracle 0.0 4.4 ora_dbw0_orcl
2880 oracle 0.0 1.7 ora_lgwr_orcl
2882 oracle 0.0 1.0 ora_ckpt_orcl
2884 oracle 0.0 5.0 ora_smon_orcl
2886 oracle 0.0 0.8 ora_reco_orcl
2888 oracle 0.0 2.3 ora_cjq0_orcl
2890 oracle 0.0 4.7 ora_mmon_orcl
2892 oracle 0.0 0.7 ora_mmnl_orcl
2894 oracle 0.0 0.5 ora_d000_orcl
2896 oracle 0.0 0.5 ora_s000_orcl
2904 oracle 0.0 0.5 ora_qmnc_orcl
2922 oracle 0.0 2.2 ora_q000_orcl
2924 oracle 0.0 0.5 ora_q001_orcl
20186 oracle 0.0 5.3 oracleorcl (LOCAL=NO)
22556 root 0.0 0.1 sshd: oracle [priv]
22558 oracle 0.0 0.0 sshd: oracle@pts/7
22559 oracle 0.0 0.0 -bash
22877 oracle 0.0 0.9 ora_j000_orcl

For this I used the following code

#!/usr/bin/perl -w

@arr1 = qw/java oracle/;
@arr2 = `ps -eo pid,user,pcpu,pmem,args | grep -v grep | grep $arr1[1]`;
$length= $#arr2;

for($i=0;$i<=$length;$i++)
{
chomp;
$val=$arr2[$i];
#print $val."\n";
@arr = split(/\s+/,$val);
print $arr[1]."\n";

But I am not getting the desired output.

Thanks & Regards in advance
Anirban Adhikary.


Relevant Pages

  • Re: same application on multiple schemas
    ... application must have its own "database", or schema, Oracle speaking. ...  Do they need separate schemas or do they need separate ... providing and appplication for multiple customers on a single database. ... it still scales better in Oracle. ...
    (comp.databases.oracle.server)
  • Re: Multi-column indexes vs Single Column Indexes
    ... if I created separate indexes: ... Oracle could use these indexes if either col1 or col2 was used in ... However if I had an index on multiple columns, Oracle will ...
    (comp.databases.oracle.server)
  • Re: Oracle 10G Grid Control
    ... The Grid is separate and the Diagnostic Pack, Tuning Pack, etc. ... Why should a customer have to dig for basic information to determine ... Then once you get into the store, ... for 'purchase' or 'store' in the search boxes on the Oracle pages. ...
    (comp.databases.oracle.server)
  • Re: Oracle 10G Grid Control
    ... The Grid is separate and the Diagnostic Pack, Tuning Pack, etc. ... separate licensing. ... Then once you get into the store, ... for 'purchase' or 'store' in the search boxes on the Oracle pages. ...
    (comp.databases.oracle.server)
  • Re: Creating schema in oracle10g express edition
    ... how it's done in oracle. ... websites resindent in iis web server, ... separate accounts with oracle u have to create 20 separate schemas.. ...
    (comp.databases.oracle.server)