Discussion:
[mongodb-user] mongodb startup logs
roshni chatterjee
2017-01-31 09:32:52 UTC
Permalink
Hi I am a novice mongodb user .
I am trying to understand it from the development point of view .

Can someboy help me with how to get the mongodb startup logs .
I mean the logs when the system is started and automatically starts mongo
daemon to the time I connect using mongo shell .

Environment Linux
Ubuntu 14.04

the logs at the path /var/log/mongodb/mongodb.log didno thelp me ...
I need the initializer logs for mongodb .

Regards,
Roshni
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/c459819d-7db3-4e78-98bf-8c1a37690a62%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Attila Tozser
2017-01-31 14:14:47 UTC
Permalink
More or less you can use more or less.

Bit more seriously it is just a text file. You can read it by any suitable
tool from command line.

In case your question specificly the startup you can grep for :
[initandlisten]
2017-01-31T14:51:34.513+0100 I CONTROL *[initandlisten]* MongoDB
starting : pid=9787 port=27017 dbpath=./db 64-bit host=attish-ThinkPad-T510
2017-01-31T14:51:34.513+0100 I CONTROL *[initandlisten]* db version
v3.5.1-193-g9eef4e6
9eef4e66adb645120491a3a79e705f7594af869a
If you do not have a way to access the logfile from the commandline
all the info ( i think except the warnings ) you can find in the local
database startup_log collection.

and there is a command which you can use to read the recent loglines:

set1:PRIMARY> db.adminCommand({getLog: "*" })
{ "names" : [ "global", "rs", "startupWarnings" ], "ok" : 1 }
set1:PRIMARY> db.adminCommand({getLog: "global" })
{
"totalLinesWritten" : 54,
"log" : [
"2017-01-31T14:54:21.565+0100 I CONTROL [initandlisten] MongoDB starting
: pid=9958 port=27017 dbpath=./db 64-bit host=attish-ThinkPad-T510",
"2017-01-31T14:54:21.565+0100 I CONTROL [initandlisten] db version
v3.5.1-193-g9eef4e6",
9eef4e66adb645120491a3a79e705f7594af869a",
tcmalloc",
"2017-01-31T14:54:21.565+0100 I CONTROL [initandlisten] modules: none",
"2017-01-31T14:54:21.565+0100 I CONTROL [initandlisten] build
environment:",
Actually i am not sure how much data it can return,

to get the startup warnings:

set1:PRIMARY> db.adminCommand({getLog: "startupWarnings" })
{
"totalLinesWritten" : 17,
"log" : [
"2017-01-31T14:54:21.585+0100 I STORAGE [initandlisten] ",
"2017-01-31T14:54:21.585+0100 I STORAGE [initandlisten] ** WARNING: Using
the XFS filesystem is strongly recommended with the WiredTiger storage
engine",
"2017-01-31T14:54:21.585+0100 I STORAGE [initandlisten] ** See
http://dochub.mongodb.org/core/prodnotes-filesystem",
"2017-01-31T14:54:28.778+0100 I CONTROL [initandlisten] ",
"2017-01-31T14:54:28.778+0100 I CONTROL [initandlisten] ** NOTE: This is
a development version (3.5.1-193-g9eef4e6) of MongoDB.",
"2017-01-31T14:54:28.778+0100 I CONTROL [initandlisten] ** Not
recommended for production.",
which with you can find out when your mongod started to check the rest of
the logs in the logfile.
on the other hand the rest of the information even the startup process is
accessing through internal commands
Hi I am a novice mongodb user .
I am trying to understand it from the development point of view .
Can someboy help me with how to get the mongodb startup logs .
I mean the logs when the system is started and automatically starts mongo
daemon to the time I connect using mongo shell .
Environment Linux
Ubuntu 14.04
the logs at the path /var/log/mongodb/mongodb.log didno thelp me ...
I need the initializer logs for mongodb .
Regards,
Roshni
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups
"mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/
msgid/mongodb-user/c459819d-7db3-4e78-98bf-8c1a37690a62%40googlegroups.com
<https://groups.google.com/d/msgid/mongodb-user/c459819d-7db3-4e78-98bf-8c1a37690a62%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/CABk9snreO2rsHQ9Mq3sbPLKWfGRzzKVg8erOneE5nXVh8yFCiQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
roshni chatterjee
2017-01-31 14:30:20 UTC
Permalink
This is not what I want...this is available .. I want the startup sequence
from the networking view...I once we trigger
sudo service mongod start..what happens in the kernel where aviha daemon .
Network manager etc comes into play..
If you have any information regarding that sequence it would be helpful

Regards,
Roshni
Post by Attila Tozser
More or less you can use more or less.
Bit more seriously it is just a text file. You can read it by any suitable
tool from command line.
[initandlisten]
2017-01-31T14:51:34.513+0100 I CONTROL *[initandlisten]* MongoDB
starting : pid=9787 port=27017 dbpath=./db 64-bit host=attish-ThinkPad-T510
2017-01-31T14:51:34.513+0100 I CONTROL *[initandlisten]* db version
v3.5.1-193-g9eef4e6
9eef4e66adb645120491a3a79e705f7594af869a
If you do not have a way to access the logfile from the commandline
all the info ( i think except the warnings ) you can find in the local
database startup_log collection.
set1:PRIMARY> db.adminCommand({getLog: "*" })
{ "names" : [ "global", "rs", "startupWarnings" ], "ok" : 1 }
set1:PRIMARY> db.adminCommand({getLog: "global" })
{
"totalLinesWritten" : 54,
"log" : [
"2017-01-31T14:54:21.565+0100 I CONTROL [initandlisten] MongoDB starting
: pid=9958 port=27017 dbpath=./db 64-bit host=attish-ThinkPad-T510",
"2017-01-31T14:54:21.565+0100 I CONTROL [initandlisten] db version
v3.5.1-193-g9eef4e6",
9eef4e66adb645120491a3a79e705f7594af869a",
tcmalloc",
"2017-01-31T14:54:21.565+0100 I CONTROL [initandlisten] modules: none",
"2017-01-31T14:54:21.565+0100 I CONTROL [initandlisten] build
environment:",
Actually i am not sure how much data it can return,
set1:PRIMARY> db.adminCommand({getLog: "startupWarnings" })
{
"totalLinesWritten" : 17,
"log" : [
"2017-01-31T14:54:21.585+0100 I STORAGE [initandlisten] ",
Using the XFS filesystem is strongly recommended with the WiredTiger
storage engine",
"2017-01-31T14:54:21.585+0100 I STORAGE [initandlisten] ** See
http://dochub.mongodb.org/core/prodnotes-filesystem",
"2017-01-31T14:54:28.778+0100 I CONTROL [initandlisten] ",
"2017-01-31T14:54:28.778+0100 I CONTROL [initandlisten] ** NOTE: This is
a development version (3.5.1-193-g9eef4e6) of MongoDB.",
"2017-01-31T14:54:28.778+0100 I CONTROL [initandlisten] ** Not
recommended for production.",
which with you can find out when your mongod started to check the rest of
the logs in the logfile.
on the other hand the rest of the information even the startup process is
accessing through internal commands
Hi I am a novice mongodb user .
I am trying to understand it from the development point of view .
Can someboy help me with how to get the mongodb startup logs .
I mean the logs when the system is started and automatically starts mongo
daemon to the time I connect using mongo shell .
Environment Linux
Ubuntu 14.04
the logs at the path /var/log/mongodb/mongodb.log didno thelp me ...
I need the initializer logs for mongodb .
Regards,
Roshni
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups
"mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/ms
gid/mongodb-user/c459819d-7db3-4e78-98bf-8c1a37690a62%40googlegroups.com
<https://groups.google.com/d/msgid/mongodb-user/c459819d-7db3-4e78-98bf-8c1a37690a62%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups
"mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/
msgid/mongodb-user/CABk9snreO2rsHQ9Mq3sbPLKWfGRzz
KVg8erOneE5nXVh8yFCiQ%40mail.gmail.com
<https://groups.google.com/d/msgid/mongodb-user/CABk9snreO2rsHQ9Mq3sbPLKWfGRzzKVg8erOneE5nXVh8yFCiQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/CAAQoYQsFMO1hLtwxtq6x%2B7mXQ-a9CnTUiV3OzFpztvxMubJJwA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Attila Tozser
2017-01-31 15:30:31 UTC
Permalink
I would try Ftrace https://lwn.net/Articles/365835/ but depends on what you
would like to see.

you can strace: https://linux.die.net/man/1/strace also individual
components like mongod
Post by roshni chatterjee
This is not what I want...this is available .. I want the startup sequence
from the networking view...I once we trigger
sudo service mongod start..what happens in the kernel where aviha daemon .
Network manager etc comes into play..
If you have any information regarding that sequence it would be helpful
Regards,
Roshni
Post by Attila Tozser
More or less you can use more or less.
Bit more seriously it is just a text file. You can read it by any
suitable tool from command line.
[initandlisten]
2017-01-31T14:51:34.513+0100 I CONTROL *[initandlisten]* MongoDB
starting : pid=9787 port=27017 dbpath=./db 64-bit host=attish-ThinkPad-T510
2017-01-31T14:51:34.513+0100 I CONTROL *[initandlisten]* db version
v3.5.1-193-g9eef4e6
9eef4e66adb645120491a3a79e705f7594af869a
If you do not have a way to access the logfile from the commandline
all the info ( i think except the warnings ) you can find in the local
database startup_log collection.
set1:PRIMARY> db.adminCommand({getLog: "*" })
{ "names" : [ "global", "rs", "startupWarnings" ], "ok" : 1 }
set1:PRIMARY> db.adminCommand({getLog: "global" })
{
"totalLinesWritten" : 54,
"log" : [
"2017-01-31T14:54:21.565+0100 I CONTROL [initandlisten] MongoDB
starting : pid=9958 port=27017 dbpath=./db 64-bit
host=attish-ThinkPad-T510",
"2017-01-31T14:54:21.565+0100 I CONTROL [initandlisten] db version
v3.5.1-193-g9eef4e6",
9eef4e66adb645120491a3a79e705f7594af869a",
tcmalloc",
"2017-01-31T14:54:21.565+0100 I CONTROL [initandlisten] modules: none",
"2017-01-31T14:54:21.565+0100 I CONTROL [initandlisten] build
environment:",
Actually i am not sure how much data it can return,
set1:PRIMARY> db.adminCommand({getLog: "startupWarnings" })
{
"totalLinesWritten" : 17,
"log" : [
"2017-01-31T14:54:21.585+0100 I STORAGE [initandlisten] ",
Using the XFS filesystem is strongly recommended with the WiredTiger
storage engine",
"2017-01-31T14:54:21.585+0100 I STORAGE [initandlisten] ** See
http://dochub.mongodb.org/core/prodnotes-filesystem",
"2017-01-31T14:54:28.778+0100 I CONTROL [initandlisten] ",
"2017-01-31T14:54:28.778+0100 I CONTROL [initandlisten] ** NOTE: This
is a development version (3.5.1-193-g9eef4e6) of MongoDB.",
"2017-01-31T14:54:28.778+0100 I CONTROL [initandlisten] ** Not
recommended for production.",
which with you can find out when your mongod started to check the rest of
the logs in the logfile.
on the other hand the rest of the information even the startup process is
accessing through internal commands
Hi I am a novice mongodb user .
I am trying to understand it from the development point of view .
Can someboy help me with how to get the mongodb startup logs .
I mean the logs when the system is started and automatically starts
mongo daemon to the time I connect using mongo shell .
Environment Linux
Ubuntu 14.04
the logs at the path /var/log/mongodb/mongodb.log didno thelp me ...
I need the initializer logs for mongodb .
Regards,
Roshni
--
You received this message because you are subscribed to the Google
Groups "mongodb-user"
group.
https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/ms
gid/mongodb-user/c459819d-7db3-4e78-98bf-8c1a37690a62%40googlegroups.com
<https://groups.google.com/d/msgid/mongodb-user/c459819d-7db3-4e78-98bf-8c1a37690a62%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups
"mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/ms
gid/mongodb-user/CABk9snreO2rsHQ9Mq3sbPLKWfGRzzKVg8erOneE5nX
Vh8yFCiQ%40mail.gmail.com
<https://groups.google.com/d/msgid/mongodb-user/CABk9snreO2rsHQ9Mq3sbPLKWfGRzzKVg8erOneE5nXVh8yFCiQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups
"mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/
msgid/mongodb-user/CAAQoYQsFMO1hLtwxtq6x%2B7mXQ-a9CnTUiV3OzFpztvxMubJJwA%
40mail.gmail.com
<https://groups.google.com/d/msgid/mongodb-user/CAAQoYQsFMO1hLtwxtq6x%2B7mXQ-a9CnTUiV3OzFpztvxMubJJwA%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/CABk9snoLnq4g1LstUYWz7zXvhOd2m2TFu9iF50xvBskuv0A0qA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...