LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 11-09-2018, 03:44 PM   #1
Shorrie
LQ Newbie
 
Registered: Nov 2018
Posts: 21

Rep: Reputation: Disabled
nonitrc file is blank


I'm following alone on youtube tutor linux videos to learn linux. One of the videos walk you thur installing and editing monit. It called for me to mv monitrc to monitrc-ORIG. now when i open monitrc in nano it's blank. I did this as root. Is there a way to fix this?

If I do cat monitrc or monitrc-ORIG i get the below:
cat: monit: no such file or directory

running Ubuntu version 18.04 kernel 4.15.0-38 generic

Thank you advance for helping me
 
Old 11-09-2018, 03:50 PM   #2
Shorrie
LQ Newbie
 
Registered: Nov 2018
Posts: 21

Original Poster
Rep: Reputation: Disabled
Sorry meant monitrc file is blank
 
Old 11-09-2018, 04:16 PM   #3
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
if you
Code:
mv monitrc monitrc-ORIG
then monitrc will not longer exist, so
Code:
cat monitrc
will say no such file or directory. Are you sure the instruction wasn't to copy (cp) the file?

When you nano monitrc, it's not blank, see the "New file" at the bottom of the screen?

So what you're seeing is what you should see.

What's your question?
 
Old 11-09-2018, 05:10 PM   #4
Shorrie
LQ Newbie
 
Registered: Nov 2018
Posts: 21

Original Poster
Rep: Reputation: Disabled
no the instructions called for mv. the first time i open monitrc in nano it had context in there. now when i open it, it's blank. So does that mean that monit is no longer working? I'm new to linux so this stuff is new to me.

Thanks for replying
 
Old 11-09-2018, 06:13 PM   #5
Shorrie
LQ Newbie
 
Registered: Nov 2018
Posts: 21

Original Poster
Rep: Reputation: Disabled
Is there a way to get the original monitrc file back or can i copy a monitrc file from somewhere?
 
Old 11-09-2018, 06:35 PM   #6
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
If monitrc-ORIG still exists:
Code:
mv monitrc-ORIG monitrc
Or, if you want to keep a file named monitrc-ORIG, use cp instead of mv.

Alternatively, I suppose you can reinstall monit to get the original file.
 
Old 11-09-2018, 06:39 PM   #7
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by Shorrie View Post
no the instructions called for mv. the first time i open monitrc in nano it had context in there. now when i open it, it's blank. So does that mean that monit is no longer working? I'm new to linux so this stuff is new to me.

Thanks for replying
I would guess that monit doesn’t work correctly if monitrc is absent.

nano shows a blank page because you renamed the file monitrc-ORIG, and no file named monitrc exists anymore. For nano, it looks like you want to create a new file with this name.
 
Old 11-09-2018, 08:42 PM   #8
Shorrie
LQ Newbie
 
Registered: Nov 2018
Posts: 21

Original Poster
Rep: Reputation: Disabled
Hi Berndbausch thanks for replying. Is there anyway to download a another copy of the monitrc file?

Thanks
Shorrie
 
Old 11-09-2018, 10:11 PM   #9
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by Shorrie View Post
Hi Berndbausch thanks for replying. Is there anyway to download a another copy of the monitrc file?
Sorry, but I don't know this application.

You must have installed it somehow in the first place. If you perform the same installation steps, you are bound to have your monitrc back. To reinstall it, the following command should do the trick:
Code:
apt-get --reinstall install

Last edited by berndbausch; 11-09-2018 at 10:16 PM.
 
Old 11-09-2018, 10:18 PM   #10
Shorrie
LQ Newbie
 
Registered: Nov 2018
Posts: 21

Original Poster
Rep: Reputation: Disabled
Smile

Berndbausch that the monit software to monitor. I tried installing it again but it says "monit is already the newest version". I guess there is no way to reinstall monit.

Thanks for your help.
 
Old 11-09-2018, 10:34 PM   #11
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by Shorrie View Post
Berndbausch that the monit software to monitor. I tried installing it again but it says "monit is already the newest version". I guess there is no way to reinstall monit.
Of course there is. Uninstall it using apt remove, then install it with apt install. And while I don't know apt so well, I would be surprised if it had no "force" option of some kind.
 
Old 11-09-2018, 10:59 PM   #12
Shorrie
LQ Newbie
 
Registered: Nov 2018
Posts: 21

Original Poster
Rep: Reputation: Disabled
bendbaush would the command be apt-get remove monit

Thank you for replying so quick
 
Old 11-09-2018, 11:11 PM   #13
Shorrie
LQ Newbie
 
Registered: Nov 2018
Posts: 21

Original Poster
Rep: Reputation: Disabled
bernbauch i remove the software using apt-get remove monit
then i tried to reinstall using apt-get install monit

I get the following message when the installed was running: Failed to start LSB: service and resource monitoring daemon. Is there a way to fix that error?

I want bother you again tonight.
Thank you so much for answering and helping me
 
Old 11-09-2018, 11:31 PM   #14
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by Shorrie View Post
Failed to start LSB: service and resource monitoring daemon
Something when wrong when starting monit. You may get clues from the output of this command:
Code:
systemctl status monit
How did you install it in the first place?

Also, what is your goal? Do you have a strong need to set up monit, or do you want to learn Linux from the videos you mention? In the latter case, I would not bother with monit and move on. Once you learn about service management with systemd (that is the service management environment used by Ubuntu), you will understand the error message and know how to address it.
 
Old 11-09-2018, 11:37 PM   #15
Shorrie
LQ Newbie
 
Registered: Nov 2018
Posts: 21

Original Poster
Rep: Reputation: Disabled
I used the following command to install monit
apt-get install monit

I just wanted to follow alone with the videos but I can move alone if it's not a big deal to have monit
 
  


Reply



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
LXer: How To Empty a File, Delete N Lines From a File, Remove Matching String From a File, And Remove Empty/Blank Lines From a File In Linux LXer Syndicated Linux News 0 11-22-2017 12:30 PM
size of a blank file raj k yadav Linux - Newbie 1 11-03-2013 02:23 AM
Shell script to get name of file, delete original file, rename blank file chrisgti Linux - General 11 09-15-2012 02:49 AM
redirect stdout to file produces blank file kissaki Linux - Software 5 01-06-2009 03:28 AM
Replace blank/almost blank lines in file Wynd Linux - General 3 01-27-2004 04:49 PM

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

All times are GMT -5. The time now is 07:50 PM.

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