[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x

Linux Networking

18K

Solutions

15K

Contributors

The variety of Linux distributions creates myriad issues relating to configuration and operations when computers are networked, not the least of which is the use of various network management applications, some of which are included with specific distributions, while others are standalone applications.

Share tech news, updates, or what's on your mind.

Sign up to Post

zgrep 'xyz'  abc.log.2018111212| grep '|[1-9][0-9][0-9][0-9][0-9]|0000' | wc -l

i am trying to figure out what above grep doing?

what is meaning of
|[1-9][0-9][0-9][0-9][0-9]|0000

wc -l means some kind of word count?
what is -l

any good links or resources or video tutorials to master greps and awk and sed end to end to debug server logs?

please advise
0
HTML5 and CSS3 Fundamentals
LVL 12
HTML5 and CSS3 Fundamentals

Build a website from the ground up by first learning the fundamentals of HTML5 and CSS3, the two popular programming languages used to present content online. HTML deals with fonts, colors, graphics, and hyperlinks, while CSS describes how HTML elements are to be displayed.

Hi

My redhat (guest OS) having issue for not able to resolve the hostname like google.com but able to ping 8.8.8.8.

I didn't do anything at all just to ensure that it can ping Google first and my network subnet like 192.168.1.0/24 when my redhat added a NAT Network adapter without issue.

After that I connect my fortinet vpn client thr IPSec and still can ping and resolve my private cloud thr hostname.

Next day I do the same thing like connect to my iPad 4G network to my Hp laptop wifi.

Can ping and resolved on my hp laptop even being connected to vpn.

The guest os redhat from virtualbox on nat can ping 8.8.8.8 but not able to resolve now.

Why yesterday can and today can't without changing anything?

Thanks.
0
Hi

My redhat (guest OS) having issue for not able to resolve the hostname like google.com but able to ping 8.8.8.8.

I didn't do anything at all just to ensure that it can ping Google first and my network subnet like 192.168.1.0/24 when my redhat added a NAT Network adapter without issue.

After that I connect my fortinet vpn client thr IPSec and still can ping and resolve my private cloud thr hostname.

Next day I do the same thing like connect to my iPad 4G network to my Hp laptop wifi.

Can ping and resolved on my hp laptop even being connected to vpn.

The guest os redhat from virtualbox on nat can ping 8.8.8.8 but not able to resolve now.

Why yesterday can and today can't without changing anything?

Thanks.
0
Hi,

I need to transfer the python script to the redhat 7.5 on virtualbox.

i've done the following:-

vb_setting1.jpg
Error

vb_setting2.jpg
Thanks
0
What's the best way to monitor for UDP syslog traffic coming in from a redhat 4 and redhat 5 syslog clients if it's not arriving at the syslog server. The syslog server is running on a Redhat 6 server. netstat -taulpe | grep syslog is showing that UDP is listening on all IP's on the server but I'd like to see if there is any other way apart from running  tcpdump -i <nic> port 514. Would watch lsof -a -i:514 show it?
0
how to add a block firewall rule in CentOS 7
using applications >> sundry>> firewall>> rich rules |    I added a destination IP, source is local ip &  & action selected drop. but still i can communicate with destination ip.
firewall profile is public.
0
Dear Experts
We are having web based CRM application running on LAMP stack web server and data base servers are running two different server. Our software developers have decided to create indexes based on their analysis due to slow queries observations, the database server is mysql 5.4 version.
As it is production server the indexing will affect the work and also the tables size is huge and overall database size is 65GB. Please suggest the best practice, following is the approach can think about but again not sure if this is best recommended but there is a challenge as mentioned, please suggest on how such cases are handled.
1.Setup new webserver and mysql server with same config and same versions and take backup of production server database and import it to the new database server and create indexes and test, this process may take few days to week and by the time indexing gets completed which may take few days during this period production server database would have undergone changes as users are working on production instance, can you please suggest the best way to handle this.
0
xhost executing successfully for the user who has the direct login access to the OS.

when I swtich to the other user (su) and which doesn't have the direct login access to OS, could not run the xhost command.

Kindly advice, how to achieve the same.
0
unix server keep sign out after 1 minute or so on production.

is there is a way i can run some process like

tail -f xyz.gz
to keep continuous rolling until i cancel that so that it wont sign out on me while i focus on some other work  for 30 miinutes and come back it should not signout
please advise
0
Hello,
can I have multiple profile on OpenVPN server ? with deferent configuration ?
for example one with cert auth and second with user name password auth ?
any example about that ?
thanks.
0
Exploring SharePoint 2016
LVL 12
Exploring SharePoint 2016

Explore SharePoint 2016, the web-based, collaborative platform that integrates with Microsoft Office to provide intranets, secure document management, and collaboration so you can develop your online and offline capabilities.

Dear Wizards, I setup the ubuntu 16.04 server in vSphere 6.5 with 250 GB hard disk, but days later I increased it to 500 GB, but seems like the VM still had only 250 GB.

How can I claim it back correctly? Many thanks!

ired1.PNG
ired2.PNG
0
After 30+ hours of research and trying different solutions I have found many solutions to each piece of this puzzle but can't quite get them to work together or figure out the best approach so I'm hoping you guys can help.

The goal: Use public IP from a remote server(Ubuntu) as a browser proxy. The kicker is that the server should pass all traffic through to a local machine which has a 4g modem internet connection to use its internet connection. We need to be able to assign fixed IP addresses/IP port combinations to these local modem/s to be used as undetectable browser proxies to make it appear that the browser client is logged in using the mobile internet connection.

I have seen multiple solutions to each part of this including the use of ssh tunnels, dynamic port forwarding/socks, remote port forwarding, squid proxy server/other proxy server software, iptables configs etc..

I have found this solution that I can get traffic to travel from anywhere to my local machine:

//1st terminal establishes connection/tunnel ssh -nN -R 8888:localhost:8889 -i "connection.pem" ubuntu@e-xx-xx-xx-xx.remote-server.com

//2nd terminal listens on port 8889 netcat -l -p 8889 //this command works and prints abc on the local machine echo "abc" | nc -v xx.xx.xx.xx(remote server ip) 8888

I have also successfully installed a squid proxy server in a docker container and used the following command to open socks connection with reverse forwarded port.

//Socks/Dynamic forwarding with…
0
how to grep multiple awks

$ awk '{print;}' employee.txt
100  Thomas  Manager    Sales       $5,000
200  Jason   Developer  Technology  $5,500
300  Sanjay  Sysadmin   Technology  $7,000
400  Nisha   Manager    Marketing   $9,500
500  Randy   DBA        Technology  $6,000


$ awk '{print $2,$5;}' employee.txt
Thomas $5,000
Jason $5,500
Sanjay $7,000
Nisha $9,500
Randy $6,000

in above query how to tweak to see  see all records whose name starts with 'S' and Salary greater than '6000'

also
in above query how to tweak to see  see all records whose name starts with 'S' and Salary greater than '6000' and Department Starts with  'T'


100  Thomas  Manager    Sales       $5,000     08/08/1988 6:00:01AM
200  Jason   Developer  Technology  $5,500 08/08/1989 7:00:02AM
300  Sanjay  Sysadmin   Technology  $7,000 08/08/1982 9:00:03AM
400  Nisha   Manager    Marketing   $9,500 08/08/1981 10:00:04AM
500  Randy   DBA        Technology  $6,000 08/08/1981 11:00:5AM
if it has joined date and time as above
in above query how to tweak to see  see all records whose name starts with 'S' and Salary greater than '6000' and Department Starts with  'T' and joined between particular date time to particular date time say  08/08/1982 9:00:03 AM till 08/08/1981 10:00:04AM
i need to use above in a zgrep command

https://www.thegeekstuff.com/2010/01/awk-introduction-tutorial-7-awk-print-examples/
0
Dear Experts

I am running crm system web-based which is LAMP stack the web root is /var/ww/html/crmapp and the CRM system reads the files from windows share that is from 2 windows server and executes the logic as per the process developed but I am getting following error from /var/log/messages , attached /etc/fstab, df -h and nswitch.conf, can you please help me in first windows share mount to the same path of web root is it recommend and also is the fstab entires are correct please suggest as the system is very slow.

automount[2560]: syntax error in map near [ * -fstype=autofs,-Dhost=& file: ]
Sep 11 20:06:15 NYSWB automount[2560]: syntax error in map near [ * -fstype=autofs,-Dhost=& file: ]
Sep 11 20:06:17 NYSWB automount[2560]: syntax error in map near [ * -fstype=autofs,-Dhost=& file: ]
Sep 11 20:06:19 NYSWB automount[2560]: syntax error in map near [ * -fstype=autofs,-Dhost=& file: ]
Sep 11 20:06:21 NYSWB automount[2560]: syntax error in map near [ * -fstype=autofs,-Dhost=& file: ]
Sep 11 20:06:23 NYSWB automount[2560]: problem reading master map, maximum wait exceeded
Sep 11 20:06:23 NYSWB automount[2560]: automount: warning: could not read at least one map source after waiting, continuing ...
Sep 11 20:06:23 NYSWB automount[2560]: syntax error in map near [ * -fstype=autofs,-Dhost=& file: ]
fstabanddf.txt
0
Dear Experts
We are having CRM application which is web-based runs on LAMP stack. the operation team reports between specific time period user get time out when they save the records or convert the records or retrieve the records, can you please suggest on how to capture log files which occurs during that time for example 5pm to 6pm, only during this time I would like to capture a following log files.
1) /var/log/mysql.log
2)/var/www/html/crmapp/crm.log
3) /var/log/slowquerylog
4)/var/log/httpd/error.log
please help with steps on above 1 to 4 log capture during specific time period , this will be helpful to investigate , thank you very much.
0
awk query
 unzip -c  xyz.log.20180905.gz| awk '$0>= "2013-Sep-09 18:33" && $0 <="2013-Sep-09 23:15"'| grep '|[1-9][0-9][0-9][0-9][0-9]|0000'|wc -l
Zip file too big (greater than 4294959102 bytes)
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
how to learn awk any good video tutorials on it?
please advise
0
zgrep 'XYZ|AB|MASTER' AAAA.log.20180904.gz | grep '|[1-9][0-9][0-9][0-9][0-9]|0000' | wc -l

can you please advise what is the meaning of above zgrep command

where i can find, practice and learn above kind of commands

how grep and egrep are different

https://ryanstutorials.net/linuxtutorial/grep.php
how to learn regular expressions used in queries

Please advise
0
I have a samba domain controller. all my ubuntu server is on domain. i created a group in ad.
But this group is unknown for all my ubuntu servers.
users can login to server via domain password. and all server answer back for wbinfo -g.
how to active domain groups in ubuntu servers?
0
Hi,

I'm running CentOS Linux release 7.4.1708 (Core), issue is i'm able to login using local users but not using ldap users, please help me on this.

I've tried restarting services using authconfig-tui command, but still i'm getting authentication failure error for ldap user.

please see the attached doc (ldap issue.docx), and below output commands and let me know if any other details are required.


[root@server01 log]# cat /etc/openldap/ldap.conf
#
SASL_NOCANON    on
URI ldap://<ldap servrer ip>:389/
BASE dc=prod,dc=hclpnp,dc=com
#
[root@server01 log]# getent passwd testuser
testuser:*:123456:7001:testuser:/home/testuser:/bin/bash
[root@server01 log]#


[hubba@servder01 ~]$ su - testuser
Password:
su: Authentication failure



[root@server01 log]# cat /etc/nsswitch.conf
#
# /etc/nsswitch.conf
#
# An example Name Service Switch config file. This file should be
# sorted with the most-used services at the beginning.
#
# The entry '[NOTFOUND=return]' means that the search for an
# entry should stop if the search in the previous entry turned
# up nothing. Note that if the search failed due to some other reason
# (like no NIS server responding) then the search continues with the
# next entry.
#
# Valid entries include:
#
#       nisplus                 Use NIS+ (NIS version 3)
#       nis                     Use NIS (NIS version 2), also called YP
#       dns                     Use DNS (Domain Name Service)
#       files              …
0
Why Diversity in Tech Matters
LVL 12
Why Diversity in Tech Matters

Kesha Williams, certified professional and software developer, explores the imbalance of diversity in the world of technology -- especially when it comes to hiring women. She showcases ways she's making a difference through the Colors of STEM program.

Hi guys, I'm currently doing send mail to fax by using hylafax. I'm using thunderbird to send mail to my fax machine. The mail address looks like this 123456@mail.hylafax.com. So my current problem is when i send the mail to the fax machine, what i received at the machine was all the log text, my sent content was not there, it print out the log message in /temp/mail2faxlog
i will attach my postfix main.cf, master.cf,  mail2fax.sh  and my valias file in here.

My transport file looks like this:
mail.hylafax.com fax:localhost

My valias
@mail.hylafax.com mail2fax

I'm currently following these guide:
http://hylafax.sourceforge.net/howto/faxing.php 
http://www.postfix.org/faq.html#fax
mail2fax.sh
master.cf
main.cf
0
file create error on below site


https://www.tutorialspoint.com/execute_bash_online.php

please advise how to create some files and practice grep commands there

any other online free tools to practice unix.

please advise
fileCreate.png
0
I tried setting up tftp on a lnux server using proc here http://wiki.r1soft.com/display/ServerBackup/Configure+a+TFTP+server+on+Linux

But when I run tftp  -c get ls  - I get..

$ tftp  -c get ls
(to)

The article states "If the TFTP server works, the command will not return any output and the file ls should appear in the current directory."

Not working as expected. Anything need to be done? Permission changes to /tftpboot? Anything else I can do to verify that tftp portion of xinetd is
working as expected?



Linux myfoo 2.6.32-279.19.1.el6.x86_64 #1 SMP Wed Dec 19 07:05:20 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
0
what is the meaning of below command

zgrep 'CUSTOMERPASS' abcd.20180719.gz|grep -v 'Trials: 1'|less



Is there is single link, tutorial or video tutorial where i can find above kind of command
and
count command

more
less
grep
etc.

alll commonly used commands like above
why we need | before less?

Please advise
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

Linux Networking

18K

Solutions

15K

Contributors

The variety of Linux distributions creates myriad issues relating to configuration and operations when computers are networked, not the least of which is the use of various network management applications, some of which are included with specific distributions, while others are standalone applications.