LinuxQuestions.org
Visit Jeremy's Blog.
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 01-19-2017, 03:24 AM   #1
arun natarajan
Member
 
Registered: Jun 2014
Posts: 111

Rep: Reputation: Disabled
memory logs


Hi,

I manually created a process to occupy the memory and when i tried to monitor the logs when physical memory is full, i was not able to see any "alert" or "warning" or "oom" or "out of memory" in logs.

Kindly let me know where can i check the logs when the physical memory is full ???

[root@localhost sa]# uname -a
Linux localhost.localdomain 3.10.0-123.el7.x86_64 #1 SMP Mon May 5 11:16:57 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux

root@localhost /]# cat: write error: No space left on device
ls -ltr
total 17348580

[root@localhost /]# df -TH
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda3 xfs 20G 20G 21k 100% /
devtmpfs devtmpfs 953M 0 953M 0% /dev
tmpfs tmpfs 958M 0 958M 0% /dev/shm
tmpfs tmpfs 958M 9.1M 949M 1% /run
tmpfs tmpfs 958M 0 958M 0% /sys/fs/cgroup
/dev/sda1 xfs 312M 89M 223M 29% /boot

no luck on using below commands...

[root@localhost /]# egrep -ir "alert|warning|oom|out of memory" /var/log/*
[root@localhost /]# journalctl -p warning
 
Old 01-19-2017, 03:36 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 13,576

Rep: Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341
you can check, if the swap is in use the main memory usually is full. Otherwise you ought to read about memory handling on linux, it is not that simple at all. For example you can try to allocate more memory and even more memory (more than what you have).
 
Old 01-19-2017, 04:55 AM   #3
arun natarajan
Member
 
Registered: Jun 2014
Posts: 111

Original Poster
Rep: Reputation: Disabled
Hi,

I understand your point.

Here I am saying about permanent memory (hdd) and not about temporary memory(RAM, SWAP)

When my HDD is full , the logs should have the records of every transaction, right ?
 
Old 01-19-2017, 07:22 AM   #4
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 13,576

Rep: Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341
when the root filesystem is full probably you cannot write log files...
 
Old 01-19-2017, 03:41 PM   #5
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,645

Rep: Reputation: 359Reputation: 359Reputation: 359Reputation: 359
Quote:
I manually created a process to occupy the memory...
Why?
 
1 members found this post helpful.
Old 01-19-2017, 05:29 PM   #6
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Yawnstown, Ohio
Distribution: Mojave
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Show us your code and we'll show you ours?
 
Old 01-20-2017, 04:23 AM   #7
Jjanel
Member
 
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
Blog Entries: 12

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
test_fill /boot partition, instead of root fs (where your /var/log is)

[wild-guess] Try `dmesg|tail`. Per `man dmesg`:
Quote:
dmesg is used to examine or control the kernel ring buffer.

The default action is to display all messages from the kernel ring buffer.
When fs is full, you cannot write to it, so you can't read the info that you canNOT write.
p.s. disk is NOT usually called "physical memory"; RAM is called memory; disk is called disk. See wiki. (Was your *goal* to study 'full' errors? Have /var/log on *separate* partition!)

Last edited by Jjanel; 01-20-2017 at 09:28 AM.
 
Old 01-20-2017, 07:17 AM   #8
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Yawnstown, Ohio
Distribution: Mojave
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
reboot.

Done.

clean out /home as it appears to be part of the 20 G / (sda5 ) partition.
Code:
sudo du -sh /home/*|sort -g
should show you something.

Code:
sudo du -sh /home/*/*| sort -g
should show you "more" of something.

Last edited by Habitual; 01-20-2017 at 09:39 AM.
 
Old 01-20-2017, 07:27 PM   #9
Jjanel
Member
 
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
Blog Entries: 12

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
Code:
/dev/sda3 xfs 20G  20G 21k 100% /
/dev/sda1 xfs 312M 89M 223M 29% /boot
@OP: change your `cat ... >file&` *TO* >/boot/file&
Pick a *test file name*. like zzz or MYfile, that doesNOT overwrite/damage anything already there!

Then, try your egrep and journalctl commands. Let us know if that helps.

p.s. your /home may be empty, if you didn't put anything there; mine (tempVBoxes) often is;
`reboot` may loose/erase/destroy your "kernel ring buffer", but I'm not sure.
(I think SunOS4.x used to save it across reboots, for logging, but I haven't taken the time to try/study this on Linux.)

Also, please Edit in Post#1 here the Title of this Thread to be more accurately descriptive, like:
Want to see/view system log error messages when a filesystem is full/filled (learning)

This will help others find this solution in the future, esp. via. "Similar Threads" at bottom of page. Also, use CODE tags. ('bbcode' formatting)

Last edited by Jjanel; 01-21-2017 at 12:32 AM.
 
Old 01-21-2017, 04:49 AM   #10
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 13,576

Rep: Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341
probably you can remove: /var/cache/apt/archives/*
although it is not a nice solution
by the way, what will du -sh /var/* respond?
 
  


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
Confirming an interview question about httpd logs and memory bits45 Linux - General 11 08-24-2016 08:28 AM
Back up logs file and create a script showing the backed up logs and the running logs Billy_6052 Programming 5 12-13-2014 03:32 AM
logs are not generating inside sftp logs, while acitive directory users are loggin in deepak_message Linux - Server 6 03-24-2013 12:37 PM
How to save skype and instant message logs to a usb memory stick Steve900 Slackware 1 04-30-2011 06:04 AM
Out Of Memory problems. My server is down. Memory logs attached. guarriman Linux - General 7 06-10-2008 08:46 AM

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

All times are GMT -5. The time now is 07:09 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration