-1
My-MacBook-Pro:~ peter********$ ps -xa | grep mongod

52360 ??            0:01.43 mongod

52484 ttys000    0:00.00 grep mongPPPPPetPetPPPPPPPPPPPPPPPPPPPPPPPPeters-MacBook-PrPeterPPPetPePetersPetPeterPeters-MaPetPetePePePeters-MacPeters-MacBookPeters-Peters-MacPeters-Pe

any, that last part keeps going on, and it really confuses me. What the heck? Also, what do the 52360 and 52484 refer to, and why does one have two question marks? All I'm trying to do is get mongodb up and running, but I can't even find the directory in which it's located. Ah, so confusing.

Thanks for any observations or help!

Neil Lunn
  • 148,042
  • 36
  • 346
  • 317
Peter.Ward
  • 7
  • 1
  • 6

1 Answers1

0

The numbers are Process IDs for the two processes you found. Your mongod process has ID of 52360. The process you've just launched that you're trying to find mongod with is 52484.

ttys000 is the terminal device you have launched your grep command from. mongod was started by the system, not from a terminal, so does not have a terminal device attached to it. Nothing to worry about there.

I am not sure why your grep command got corrupted; but it has nothing to do with mongod itself, so feel free to disregard it.

The way to find any file on Mac OS X, if the index is up-to-date:

mdfind mongod

If the file is an executable that you are able to execute, you can reliably find it using

which mongod

The way to find a file that came from a package depends on the way it was packaged (i.e. if you just copied an app into your /Applications, or if you used Homebrew, or ports, fink, or a .pkg file, or something else).

The way to find the current working directory of a process:

lsof -a -d cwd -p 52360

where 52360 is the process ID as explained above (this is probably not the location of the executable, but you might want to know).

Amadan
  • 191,408
  • 23
  • 240
  • 301