We help IT Professionals succeed at work.

Unix OS

33K

Solutions

18K

Contributors

Unix is a multitasking, multi-user computer operating system originally developed in 1969 at Bell Labs. Today, it is a modern OS with many commercial flavors and licensees, including FreeBSD, Hewlett-Packard’s UX, IBM AIX and Apple Mac OS-X. Apart from its command-line interface, most UNIX variations support the standardized X Window System for GUIs, with the exception of the Mac OS, which uses a proprietary system.

how to find number of count in the unix logs for a grep search keyword say 'nullpointerexception on deviding 109418 with 0' please advise
0
Dear Experts,

On AIX I need to compare 2 files holding percentage space usage:

Format:

hn5691    :   /appli/oltb/apache/logs     72 %
hn5785    :   /appli/logs/REPORTING     38 %
...

If the percentage in the second file is 10% higher than in first file it should write that in a file (so that can be mailed).
Idea is to catch a looping process.

I'm not enough into awk to make it work, your help is appreciated.
I attach 2 files to work with.

Many thanks in advance.
W.
file2.txt
file1.txt
0
server times out

i have 15 production unix server instances to check logs same time

when i am on one monitor other monitor times out in every 15 minutes

if i type
tail -f logfile


does it still times out on me

i cannot change time out setting myself

just looking for some work around so that i do not have to enter username and password all over again
0
transactions search in unix logs


in the unix logs of transactions each transaction has bunch of values like

transaction_id|transaction_time|transaction_description|transaction_type| ......etc



if i want to display only the transactions that took more than say 30 minutes and whose transaction_type is "sell"

how do i frame my grep command for that

any sample queries, links, resources, sample video tutorials on this

Please advise
0
Hi, All.

I have an issue with IPTABLES rules. Here is below image shows my iptables rules. But i can not "telnet" port 2196. I've edited directly "/etc/sysconfig/selinux". And restarted iptables. Selinux disabled.

What am i doing wrong ?

0
what is the meaning of below command

less log123.log | grep -i nullpointerexception


why we use less and then grep on it

Please advise
0
in vi we can use /nullpointerexception to find that string right.

how to find how many occurrence of that string total and go to say 10th occurence line
please advise
0
when i open with winscp that opens old stale file compared to putty opening of same file say xyz.ccfg

i wonder why winscp does not show recent changs?

please advise
0
tail -f logfile.log


what is the meaning of above command.

i see logs rolling too fast.

is there is a way i can slow it down to see clearly slowly

any god tips, links, resources on how to debug production logs efficiently just using putty without any fancy costly tools?

please advise
0
At work I have a separate Unix password for unix systems. I reset my password
through a utility that gives me a temp password. Then I

sudo passwd

and change the password. I log out and log back in with the new password a few
seconds later. Success! But then a few hours later I try to log in with the new password
and it's no longer working and I have to go through the password reset process.

Anyone have a hunch what's going on?
0
I added this alias in my .bashrc file so it looks like this:

alias gh="grep \"hello world\" /folder/"

Open in new window


but when I type 'gh' into the command line I get the error:

> gh
bash: gh: command not found

Open in new window


Am I missing something?
0
i have files how can i get there size in gb
0
I created a script that will append a cron job if it's not in the crontab file, but the problem is the appended job will not work unless I edit the crontab file using crontab -e. Is there a way to refresh cron in AIX without killing the process?
0
difference between double and single quote in unix vs windows word document


1.
grep ‘Bean’ abc_1.log.20180627 //i am able to type this angular single quote in windows laptop in a word pad to save all commands to copy paste to unix box

2.
grep 'Bean' abc_1.log.20180627//why i cannot type this straight single quote character on windows laptop in a word pad to save all commands to copy paste to unix box?
3.
grep "Bean" abc_1.log.20180627


when i type below in word document of windows its shows as

grep ‘Bean’ abc_1.log.20180627
when i type below in putty/mputty of windows its shows as
grep 'Bean' abc_1.log.20180627



my purpose is to save all these unix queries to a word document so that next time i can copy paste from word document to putty and execute them without any tweaking to queries.

Please advise
grepCommands.png
0
This is solaris-10 zone and it is repeated issue, I am seeing since sometime. Due to some reason, syslog is holding space and it keeps filling root file-system. I had to nullify process file of syslog and then space consumption of root was reduced from 19 GB to 2.7GB
bash-3.2# svcadm disable svc:/site/system/syslog-ng:default
bash-3.2# find /proc -type f -links 0 -ls | sort -n +6 | tail
find: stat() error /proc/11835/fd/43: No such file or directory
find: stat() error /proc/11820/fd/43: No such file or directory
find: stat() error /proc/11829/fd/43: No such file or directory
find: stat() error /proc/11821/fd/43: No such file or directory
find: stat() error /proc/11827/fd/43: No such file or directory
find: stat() error /proc/11825/fd/43: No such file or directory
find: stat() error /proc/11833/fd/43: No such file or directory
find: stat() error /proc/11826/fd/43: No such file or directory
find: stat() error /proc/11832/fd/43: No such file or directory
4213633025    4 -rw-------   0 root     root         2048 Apr 12 13:23 /proc/1222/fd/6
4213638852    4 -rw-------   0 root     root         2048 May 27 21:09 /proc/1222/fd/4
45240   73 -r--r--r--   0 adm      adm         73656 Apr 13 00:36 /proc/2140/fd/3
48364 17038328 --w-------   0 root     root     17434106014 Jun 21 16:41 /proc/3065/fd/6
48364 17038328 --w-------   0 root     root     17434106014 Jun 21 16:41 /proc/3065/fd/8
bash-3.2# ps -ef | grep 3065
    root  3065  1140   0   Apr 12 ?         645:53 

Open in new window

0
TSM 7.1 running on AIX 7.1 -Is there a way to restore only the folder structure and not the files within those directories? The restore of Oracle RMAN will populate the directory structures with the files. Thanks in advance!
0
Dear Gurus,
I am using a curl command to transfer files as shown below . The reason is it needs to be sent to a particular port to enable tokenizing.
curl -k -v -T /export/home/flex/sample_files/Test_account_20180610.csv https://starserver.com:4443/webdav/Test_account_20180610.csv

Open in new window


This works fine.
The problem is that now I need to automate it using a scheduler.. but the file name suffix which is a date stamp keeps changing everyday.
Is there a way where I can give a curl command which just takes the file name irrespective of timestamp and put it in the webdav folder.
Something like this:

curl -k -v -T /export/home/flex/sample_files/Test_account_*.csv https://starserver.com:4443/webdav/Test_account_*.csv

Open in new window


SO that in teh webdav folder, I am getting the tokenised file with the name as that in the original location.

Please advise.

Thankyou very much.
0
Hello experts,

I'm very new to linux.

I'm trying to run the following commands on my Ubuntu machine:

COPY ./package.json /data/web-app
WORKDIR /data/web-app

Can someone please show me how to run these commands?

Cheers

Carlton
0
Hi everyone!
I am trying to do a few things in my bash script (script1.sh):  pass logicals/variables to my SAS program (program1.sas), execute SAS code (program1.sas), check with "errstat" for specific errors related to SAS code conditions that I set up in my SAS code, and also check with "logerrchk" SAS log file for any errors in the SAS log.  
I think most of the script is correct but I am not sure about both checking errors (errstat" and "logerrchk").

 Please note: variable/logicals (file1, file2, plog, and errstat) are also defined in the SAS program.  

 Please provide any suggestions or examples if you can.
 Here is what I have so far:

#!/bin/bash
#script1.sh

# Creating variables for directories
export DATADIR1=/root/alldirs/2018/data1
export DATADIR2=/root/alldirs/2018/data2
export DATADIR3=/root/alldirs/2018/data3
export PROGDIR1=/root/alldirs/2018/prog1

#Creating variables for data files that are used in program1.sas and final log file 
export file1=${DATADIR1}/sasdata1.sas7bdat
export file2=${DATADIR2}/sasdata2.sas7bdat
export plog=${DATADIR3}/sas_program.log

#executing SAS program
sas ${PROGDIR1}/program1.sas -log ${DATADIR3}/program1.log

#checking for errors in SAS log file
logerrchk=$?     
   if [[ "$logerrchk" !=0 ]]; 
   then 
       echo "--- Error: Abnormal end in program program1.sas. Check log file! ---" >> $plog
       exit 2
   else
       echo "--- Program1.sas run successfully! ---" >> $plog
   fi
  
#checking for specific errors 

Open in new window

0
Unfortunately it is not clear to me how I can do it for change for client  the storage pool where data is stored,

What are the commands to be applied to tsm?

With upd copygroup give me this error :

tsm: TSM_7.1>upd copygroup SAP_PD ACTIVE PGT_DAI STANDARD Type=Archive destination=VCC_PRO_NEW
Session established with server TSM_7.1: AIX
  Server Version 7, Release 1, Level 1.100
  Server date/time: 06/05/18   16:13:12  Last access: 06/05/18   15:28:47

ANR1585E UPDATE COPYGROUP: Policy set ACTIVE cannot be modified.
ANS8001I Return code 3.

my policy

tsm: TSM_7.1>query policyset

Policy        Policy        Default       Description
Domain        Set Name      Mgmt
Name                        Class
                            Name
---------     ---------     ---------     ------------------------
SAP_PD        ACTIVE        SAP_MC        Policy set per ambiente
                                           SAP
SAP_PD        SAP_PS        SAP_MC        Policy set per ambiente
                                           SAP
0
i add my group domain in /etc/sudores file is not working
i say
sudo visudo
 and in this file after the line
%sudo   ALL=(ALL:ALL) ALL
%mydomain\\unixadmins ALL=(ALL:ALL) ALL

save file and check from /etc/sudores and it's ok.
i login as domain user to ubuntu and try to create a directory under /mnt

error:
username@domain.local is not in the sudoers file.  This incident will be reported.
0
i try to mount synology nas drev on ubuntu but in different ip rang
nas has nfs support and permission
i say
sudo mont 12.11.1.5/volume1/backup /mnt/backup/

my ubuntu har 12.10.1.8
i get connection timeout
amd with smb connection
sudo mount -t  cifs //12.11.1.5/volume1/backup /mnt/backup user=Administrator
get mount error(115) Operation now in progress
0
On tivoli tsm I need to create a new storage pool which will point all my nodes
What operations should I do?
0
Hi everyone!
I am trying to do a few things in my bash script (script1.sh):  pass logicals/variables to my SAS program (program1.sas), execute SAS code (program1.sas), check for errors, write all messages to a log file (sas_program.log), and also execute another script (script2.sh) which has a few directory logicals/variables shortcuts.

Please note: variable/logicals (file1, file2, plog, and stat) are also defined in the SAS program.  

Please provide any suggestions or examples if you can.
Here is what I have so far:

#script1.sh

#!/bin/bash

#executing script2.sh script 
source script2.sh

# Creating variables for directories
export DATADIR1=/root/alldirs/2018/data1
export DATADIR2=/root/alldirs/2018/data2
export DATADIR3=/root/alldirs/2018/data3
export PROGDIR1=/root/alldirs/2018/prog1


#Creating variables for data files that are used in program1.sas and final log file 
export file1=DATADIR1/sasdata1.sas7bdat
export file2=DATADIR2/sasdata2.sas7bdat
export plog=DATADIR3/sas_program.log

#Setting stat variable for future use
stat=0

#executing SAS program, checking for errors, and writing all messages to a log file 
sas ${PROGDIR1}/program1.sas -log ${DATADIR3}program1.log
stat=$?
   if [[ "$stat" !=0 ]]; 
     then echo -e "--- Error: Abnormal end in program program1.sas. Check log file! ---" >> $plog
    exit 2
             echo -e "--- Program1.sas run successfully! ---" >> $plog
   fi
exit 0

Open in new window




Any suggestions would be appreciated!
Thank you!
0
hi,

Did you all experienced any kind of DB2 file corruption on unix/linux OS?
0

Unix OS

33K

Solutions

18K

Contributors

Unix is a multitasking, multi-user computer operating system originally developed in 1969 at Bell Labs. Today, it is a modern OS with many commercial flavors and licensees, including FreeBSD, Hewlett-Packard’s UX, IBM AIX and Apple Mac OS-X. Apart from its command-line interface, most UNIX variations support the standardized X Window System for GUIs, with the exception of the Mac OS, which uses a proprietary system.