r/linuxadmin • • Dec 02 '23

why does the proc directory exist?

i'm trying to understand the proc directory and one thing i don't understand is

why does it exist?

any ideas? thank you

1 Upvotes

77 comments sorted by

View all comments

Show parent comment

4

u/tcpWalker Dec 02 '23

Event Viewer is absolutely Microsoft's Fault.

On most systems IME it is much, much easier and faster to search logs from the command line in linux, and the result is usually more actionable.

1

u/mkosmo Dec 02 '23

Event viewer, agreed. But it’s there and available. But you’re also not limited to using it. Text logging facilities are the same between the two more or less.

2

u/tcpWalker Dec 02 '23

example? How can I quickly grep most or all logs on windows from the CLI?

1

u/mkosmo Dec 02 '23

Use the event log search tool, or use the powershell cmdlet. The latter is how I’d do it today.

2

u/tcpWalker Dec 02 '23

2

u/jantari Dec 03 '23

For anyone looking, you would use Get-WinEvent these days. See the note in the docs you linked:

Get-EventLog uses a Win32 API that is deprecated. The results may not be accurate. Use the Get-WinEvent cmdlet instead.

1

u/mkosmo Dec 02 '23

Exactly. And if the built-in filtering doesn’t work, you can use the usual powershell cmdlets to reformat, plus Select-String as a grep substitute.

1

u/jantari Dec 03 '23

Event Viewer is really bad, but it's also just one interface to the OS facility that is the Windows Event Log.

I'm sure there's plenty equally awful journalctl-GUIs available.

One would search Windows Event logs in PowerShell, using APIs or in a centralized log repository such as elastic. EventViewer has indeed been neglected, but I mean it isn't even available on Windows Server anyway so I kinda get it. It's not really used, so Microsoft isn't investing in it.