mongostat output into a file

636 views
Skip to first unread message

dba.m...@gmail.com

unread,
May 23, 2013, 9:31:26 PM5/23/13
to mongod...@googlegroups.com
Hi,

I am trying to get output of mongostat into a file using shell script. can someone please regarding this?

Thanks,
Prasad

Kenneth Gorman

unread,
May 23, 2013, 11:19:35 PM5/23/13
to mongod...@googlegroups.com
mongostat --host=xxx --port=yyyy > mylogfile.out

-kg
> --
> --
> You received this message because you are subscribed to the Google
> Groups "mongodb-user" group.
> To post to this group, send email to mongod...@googlegroups.com
> To unsubscribe from this group, send email to
> mongodb-user...@googlegroups.com
> See also the IRC channel -- freenode.net#mongodb
>
> ---
> 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.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

dba.m...@gmail.com

unread,
May 24, 2013, 5:44:00 PM5/24/13
to mongod...@googlegroups.com
Hi Kenny,

Thanks for your reply. if i keep the same in shell script, it will hang at that step appending the file. is there any way it gathers the info and come out?

Thanks,
Prasad

dba.m...@gmail.com

unread,
May 24, 2013, 5:46:54 PM5/24/13
to mongod...@googlegroups.com
it worked  for me.. Thanks

mongostat --port <port_num> -n 10
Reply all
Reply to author
Forward
0 new messages