LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-02-2021, 04:47 AM   #1
Nattyslinux
LQ Newbie
 
Registered: Dec 2021
Posts: 1

Rep: Reputation: Disabled
Unhappy Linux command error


(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all)




That’s the error message I get on Linux after this command: netstat -antp | grep Apache
 
Old 12-02-2021, 06:11 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,789

Rep: Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304
And what is unclear with it?
 
1 members found this post helpful.
Old 12-02-2021, 06:49 AM   #3
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,292
Blog Entries: 3

Rep: Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718
For the -p option to work, you'll have to run it as root. Also the grep part ought to search for a lower case 'apache' or else use the -i option.
 
1 members found this post helpful.
Old 12-02-2021, 06:51 AM   #4
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
1. ss, which is a modern replacement for netstat, won't display this error message .

2. What netstat -antp | grep Apache is supposed to show? The netstat option -n is short for --numeric-hosts --numeric-ports --numeric-users. Your grep expression will match nothing (not to mention that the names are probably lowercase). BTW, the name of Apache binary is httpd (if that's what you were trying to match) .

Last edited by shruggy; 12-03-2021 at 01:19 AM.
 
2 members found this post helpful.
Old 12-02-2021, 08:47 PM   #5
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,310
Blog Entries: 28

Rep: Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136
The Apache process is called "httpd."
 
Old 12-02-2021, 09:01 PM   #6
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,292
Blog Entries: 3

Rep: Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718
Quote:
Originally Posted by frankbell View Post
The Apache process is called "httpd."
On some distros. On others, such as Devuan and Raspberry Pi OS, it goes by 'apache2'.

Code:
$ pgrep -lx apache2
8500 apache2
12950 apache2
12951 apache2

$ lsb_release -rd
Description:    Devuan GNU/Linux 5 (daedalus/ceres)
Release:        5
and

Code:
$ pgrep -lx apache2
537 apache2
13035 apache2
13036 apache2
13037 apache2
13038 apache2
13040 apache2
13172 apache2
15458 apache2
15473 apache2

$ lsb_release -rd
Description:    Raspbian GNU/Linux 10 (buster)
Release:        10
 
1 members found this post helpful.
Old 12-02-2021, 09:23 PM   #7
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,310
Blog Entries: 28

Rep: Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136
Quote:
On some distros. On others, such as Devuan and Raspberry Pi OS, it goes by 'apache2'.
Thanks to you, I learned something!

Last edited by frankbell; 12-02-2021 at 09:24 PM.
 
Old 12-02-2021, 10:24 PM   #8
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,355

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
I always use 'grep -i'
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] [SOLVED] bash script: can echo command, command works if I type, but command doesn't work in script ... why? hopeless_n00b Linux - Newbie 10 07-12-2018 05:57 AM
Command Substitution: $(command) vs `command` penguinbody Linux - Newbie 9 04-15-2016 07:00 AM
SED command failing while substituting variable with error unterminated `s' command vnarvankar Linux - Software 2 03-10-2016 09:10 AM
[SOLVED] run ps|grep command by script/command line ... ERROR: Unsupported option (BSD syntax) masuch Programming 4 05-23-2012 04:13 AM
My error in mkisofs command to make a command line iso mg92865 Linux - Newbie 1 06-20-2008 11:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration