TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Tell HN: ChatGPT is fantastic for finding and solving issues in logs

256 pointsby Ldorigoabout 2 years ago
Just paste in a chunk of systemd (or whatever) logs and start asking questions. Often just pasting in the logs and pressing enter results in it identifying potential problems and suggesting solutions. It helped me troubleshoot a huge amount of issues on linux desktops and servers that would have taken me a lot longer with google - even if it doesn&#x27;t always give the right solution, 99% of the time it at least points to the source of the error and gives me searchable keywords.<p>Note it works much better with GPT4 - gpt3.5 tends to hallucinate a bit too often.

28 comments

ttulabout 2 years ago
I used it to transform cryptic credit card statement items into company names, which then allowed me to query my Gmail archives for receipts and invoices from these vendors, automating a manual process of accounting backup discovery that is the bane of my very existence. I even got GPT-4 to assess whether an email likely relates to an invoice or payment so that I could limit the amount of noise extracted from my email archives.<p>I highly recommend considering GPT-4 every time you encounter a painful manual process. In nearly every case where I have applied GPT-4, it has been successful in one-shot or few-shot solving the problem.
评论 #35642973 未加载
评论 #35643004 未加载
评论 #35696357 未加载
评论 #35643254 未加载
评论 #35642519 未加载
评论 #35642537 未加载
评论 #35642877 未加载
评论 #35644039 未加载
TacticalCoderabout 2 years ago
How does that work with logs? Logs are often... Huge? How many lines of logs can you paste? Because if I first need to narrow down the log to the problematic part, I kinda already have my problem right there no?<p>Or do you mean I do something like grab the lines with &quot;error&quot; in the log, hoping there aren&#x27;t too many, then ask ChatGPT what it thinks about this:<p><pre><code> [ 0.135036] kernel: ACPI Error: AE_NOT_FOUND, During name lookup&#x2F;catalog (20210730&#x2F;psobject-220)</code></pre>
评论 #35643257 未加载
评论 #35642946 未加载
roflyearabout 2 years ago
I wish people would focus on these exceptional strengths of the model rather than blabbing about AGI or whatever.<p>Similarly to you, I have been able to find issues with logs, formatting, asking it quick query questions in [whatever flavor of query language XYZ service likes to use], etc.. and it&#x27;s really, really good.<p>The alternative is to muscle through it, using a lot of energy, writing my own parser or something dumb, or to use Google - which basically isn&#x27;t usable anymore!<p>But you have people who are like &quot;GPT CODED MY ENTIRE WEBSITE&quot; and &quot;GPT TAUGHT ME QUANTUM PHYSICS&quot; and I&#x27;m like... uh... big doubt my man...
评论 #35641608 未加载
评论 #35640415 未加载
评论 #35641766 未加载
评论 #35640266 未加载
评论 #35647709 未加载
评论 #35642171 未加载
rwl4about 2 years ago
I let GPT-4 walk me through troubleshooting steps with my extremely slow read times on my SSD-backed KVM virtual machine. It told me the things it needed, I pasted relevant logs and other output, and finally I solved my issue. I was highly impressed! It parsed atop, top, and various other content, explaining exactly what everything meant.<p>Another benefit was that it was able to present a much more readable version of some of what I pasted. I may have to start using it for cleaning up hard-to-read output (looking at you, atop!) in the future, it really excels at that!<p>Also, the issue ended up being that I that I was reading from what turned out to be an NFS mount. Doh!
评论 #35642760 未加载
Aperockyabout 2 years ago
Can any of the existing open source models do the same?<p>ChatGPT is great but I don&#x27;t want all of my queries going to OpenAI.<p>I&#x27;d rather shell out a considerable sum to buy the equipment to run my own.
评论 #35648086 未加载
评论 #35644332 未加载
zeroDivisibleabout 2 years ago
This is a great feature and I did use it few times to test. However, be aware of potentially leaking your company&#x27;s private or sensitive information when doing this.
评论 #35643010 未加载
mrsiebelabout 2 years ago
2023-05-04T04:20:42.199366-04:00 penetrati ngnu dbus-daemon[1196]: [session uid=1000 pid=1196] Successfully activated service &#x27; org.xfce.Xfconf&#x27; 2023-05-04T04:21:18.294427-04:00 penetrati ngnu wpa_supplicant[913]: wlan0: CTRL-EVEN T-BEACON-LOSS 2023-05-04T04:21:20.447830-04:00 penetrati ngnu wpa_supplicant[913]: wlan0: CTRL-EVEN T-BEACON-LOSS 2023-05-04T04:22:59.419150-04:00 penetrati ngnu systemd[1]: Started session-108.scope - Session 108 of User siebel. 2023-05-04T04:25:01.181760-04:00 penetrati ngnu CRON[363165]: (root) CMD (command -v debian-sa1 &gt; &#x2F;dev&#x2F;null &amp;&amp; debian-sa1 1 1) 2023-05-04T04:26:48.757845-04:00 penetrati ngnu systemd[1]: session-78.scope: Deactiv ated successfully. 2023-05-04T04:30:42.121839-04:00 penetrati ngnu dbus-daemon[1196]: [session uid=1000 pid=1196] Activating service name=&#x27;org.xfc e.Xfconf&#x27; requested by &#x27;:1.24&#x27; (uid=1000 p id=3360 comm=&quot;xfce4-panel&quot;) 2023-05-04T04:30:42.239103-04:00 penetrati ngnu dbus-daemon[1196]: [session uid=1000 pid=1196] Successfully activated service &#x27; org.xfce.Xfconf&#x27; 2023-05-04T04:35:01.251472-04:00 penetrati ngnu CRON[367999]: (root) CMD (command -v debian-sa1 &gt; &#x2F;dev&#x2F;null &amp;&amp; debian-sa1 1 1) 2023-05-04T04:39:01.202453-04:00 penetrati ngnu CRON[369932]: (root) CMD ( [ -x &#x2F;usr &#x2F;lib&#x2F;php&#x2F;sessionclean ] &amp;&amp; if [ ! -d &#x2F;run&#x2F; systemd&#x2F;system ]; then &#x2F;usr&#x2F;lib&#x2F;php&#x2F;sessio nclean; fi) 2023-05-04T04:39:01.267940-04:00 penetrati ngnu systemd[1]: Starting phpsessionclean. service - Clean php session files... 2023-05-04T04:39:01.431025-04:00 penetrati ngnu systemd[1]: phpsessionclean.service: Deactivated successfully. 2023-05-04T04:39:01.431258-04:00 penetrati ngnu systemd[1]: Finished phpsessionclean. service - Clean php session files. 2023-05-04T04:40:42.120741-04:00 penetrati ngnu dbus-daemon[1196]: [session uid=1000 pid=1196] Activating service name=&#x27;org.xfc e.Xfconf&#x27; requested by &#x27;:1.24&#x27; (uid=1000 p id=3360 comm=&quot;xfce4-panel&quot;) 2023-05-04T04:40:42.214032-04:00 penetrati ngnu dbus-daemon[1196]: [session uid=1000 pid=1196] Successfully activated service &#x27; org.xfce.Xfconf&#x27; 2023-05-04T04:40:52.623497-04:00 penetrati ngnu wpa_supplicant[913]: wlan0: CTRL-EVEN T-BEACON-LOSS 2023-05-04T04:45:01.213527-04:00 penetrati ngnu CRON[372890]: (root) CMD (command -v debian-sa1 &gt; &#x2F;dev&#x2F;null &amp;&amp; debian-sa1 1 1) 2023-05-04T04:49:37.313682-04:00 penetrati ngnu smartd[746]: Device: &#x2F;dev&#x2F;sda [SAT], SMART Usage Attribute: 190 Airflow_Tempera ture_Cel changed from 60 to 61 2023-05-04T04:50:42.117968-04:00 penetrati ngnu dbus-daemon[1196]: [session uid=1000 pid=1196] Activating service name=&#x27;org.xfc e.Xfconf&#x27; requested by &#x27;:1.24&#x27; (uid=1000 p id=3360 comm=&quot;xfce4-panel&quot;) 2023-05-04T04:50:42.229128-04:00 penetrati ngnu dbus-daemon[1196]: [session uid=1000 pid=1196] Successfully activated service &#x27; org.xfce.Xfconf&#x27; 2023-05-04T04:54:00.082471-04:00 penetrati ngnu wpa_supplicant[913]: wlan0: CTRL-EVEN T-BEACON-LOSS 2023-05-04T04:55:01.262268-04:00 penetrati ngnu CRON[377718]: (root) CMD (command -v debian-sa1 &gt; &#x2F;dev&#x2F;null &amp;&amp; debian-sa1 1 1) 2023-05-04T05:00:42.119305-04:00 penetrati ngnu dbus-daemon[1196]: [session uid=1000 pid=1196] Activating service name=&#x27;org.xfc e.Xfconf&#x27; requested by &#x27;:1.24&#x27; (uid=1000 p id=3360 comm=&quot;xfce4-panel&quot;) 2023-05-04T05:00:42.199605-04:00 penetrati ngnu dbus-daemon[1196]: [session uid=1000 pid=1196] Successfully activated service &#x27; org.xfce.Xfconf&#x27; 2023-05-04T05:01:53.268834-04:00 penetrati ngnu wpa_supplicant[913]: wlan0: CTRL-EVEN T-BEACON-LOSS 2023-05-04T05:01:55.324225-04:00 penetrati ngnu wpa_supplicant[913]: wlan0: CTRL-EVEN T-BEACON-LOSS 2023-05-04T05:02:02.590368-04:00 penetrati ngnu wpa_supplicant[913]: wlan0: CTRL-EVEN T-BEACON-LOSS 2023-05-04T05:02:05.152270-04:00 penetrati ngnu wpa_supplicant[913]: wlan0: CTRL-EVEN T-BEACON-LOSS 2023-05-04T05:02:10.779523-04:00 penetrati ngnu wpa_supplicant[913]: wlan0: CTRL-EVEN T-BEACON-LOSS 2023-05-04T05:02:18.766764-04:00 penetrati ngnu wpa_supplicant[913]: wlan0: CTRL-EVEN T-BEACON-LOSS 2023-05-04T05:02:41.199587-04:00 penetrati ngnu wpa_supplicant[913]: wlan0: CTRL-EVEN T-BEACON-LOSS 2023-05-04T05:02:50.721657-04:00 penetrati ngnu wpa_supplicant[913]: wlan0: CTRL-EVEN T-BEACON-LOSS 2023-05-04T05:05:01.237788-04:00 penetrati ngnu CRON[382556]: (root) CMD (command -v debian-sa1 &gt; &#x2F;dev&#x2F;null &amp;&amp; debian-sa1 1 1) 2023-05-04T05:06:43.123423-04:00 penetrati ngnu systemd[1]: Started session-115.scope - Session 115 of User siebel.<p>┌──(siebel㉿ penetratingnu)-[~] └─$ ������������������������������������������ ������������������������������������������ ������������������������������������������ ������������������������������������������ ������������������������������������������ ������������������������������������������ ������������������������������������������ ������������������������������������������ ������������������������������������������ ������������������������������������������ ������������������������������������������ ������������������������������������������ ������������������������������������������ ������������������������������������������ ������������������������������������������ ������������������������������������������ ������������������������������������������ ������������������������������������������ ������������������������������������������
moralestapiaabout 2 years ago
It truly seems to be the calculator for text.
评论 #35642239 未加载
phlip9about 2 years ago
Yeah it&#x27;s pretty awesome! I used GPT-4 last week to fix my corrupted SSD. Granted I already narrowed down the kernel logs to a few suspicious lines, but I just pasted those 10 lines in and asked for a fix. Pasting in GPT&#x27;s arcane `fsck` incantations and boom -- fixed SSD. Saved me an hour or two of hassle reading man pages and stack overflow posts.
评论 #35644245 未加载
pachicoabout 2 years ago
Phind.com is so much better.<p>I just want to pay for the service in exchange of ensuring they won&#x27;t use my data but I can&#x27;t find how.
评论 #35659808 未加载
programmer_dudeabout 2 years ago
Awesome! It is also fantastic for understanding chunks of Bash script, Perl, AWK etc where if you don&#x27;t know something then it&#x27;s next to impossible to search for it using a non-AI search engine.<p>Bonus: you can also use it to understand what the various flags in a command do.
评论 #35642783 未加载
29athrowawayabout 2 years ago
You better ask it to write software to analyze logs rather than analyze logs. Or your OpenAI bill will go to the roof.
bolanyoabout 2 years ago
systemd is a very common log.<p>I&#x27;m curious whether you think this would work on logs for custom software that by necessity didn&#x27;t have either its logs or writing about its logs in the training set.
评论 #35642222 未加载
评论 #35642047 未加载
csomarabout 2 years ago
I used recently to navigate a quite complex Bash script. This is using Codex.<p>I&#x27;d go just below the line that I don&#x27;t understand and type<p><pre><code> # Explain the line above in detail: &lt;&lt; gpt explanation &gt;&gt; </code></pre> And it&#x27;d write a very decent explanation that makes sense most of the time. Basically decrypting bash code, which I suck at.<p>However, there was one instance where it almost freaked me out as the output was quite human like:<p><pre><code> # Explain the line above: &lt;&lt;I don&#x27;t understand it&gt;&gt;.</code></pre>
busseioabout 2 years ago
Great use case. I have successfully used it in a similar way with SRT files (recording transcripts in SubRip Subtitle format) as well as CSV data from surveys that often has many columns with long text labels (the survey questions) and free text answers.<p>Ex. a prompt I had used for a developer skills survey .csv was:<p>&gt; The CSV data below is the results of a skills survey sent to a group of software engineers. The first row is a header row. Please summarize this data in the areas that the People are Strong, Weak, Most Similar, and Unique:<p>Then, because of things I saw in the response, I asked a few follow-up questions:<p>&gt; How much Azure experience is there in the group?<p>&gt; Can you provide more explanation around your assessment that &quot;Engineers generally have little to no experience with Dockers and Kubernetes.&quot;<p>&gt; What other skills and experience do you see in the results that you haven&#x27;t already mentioned?<p>To address my risk tolerance vis-a-vis the ChatGPT warnings (and previous UI leak of responses), I replaced the email addresses in the .csv file with &quot;PersonA&quot;, &quot;PersonB&quot;, ...
swahabout 2 years ago
Yesterday I dumped a broken markdown table and asked for the first &quot;column&quot; as CSV values. Works really well for this stuff too.
评论 #35641378 未加载
评论 #35641692 未加载
评论 #35641437 未加载
kakwa_about 2 years ago
As another side note, using ChatGPT as a search engine is not so great.<p>Recently, I was trying to find golang libraries for managing authorization. The first one was a well known library (I was incidentally trying to avoid).<p>But the others 4 were complete were completely fantasy projects. ChatGPT simply invented complete projects with descriptions and github urls.<p>Interestingly, looking at the urls, it seemed to actually be a composition of authors working on the subject and similar project in other languages.<p>I also observed the same behavior when I tried to find community resale&#x2F;recycling centers (ressourcerie in French) in my neighborhood, and sure enough it generated a bunch of fake addresses.<p>It&#x27;s logical in hindsight, ChatGPT is a generative AI after all. But these results left me scratching my head at first.
评论 #35656943 未加载
dustymcpabout 2 years ago
I concur ive been using it daily for all sorts of tasks, cant read Microsofts docs round it up get the important stuff i love it :)
lumb63about 2 years ago
What’s wrong with “grep -i error”? That gets me to the source of the error, usually.
评论 #35646477 未加载
ilytabout 2 years ago
Even free one managed to decipher my 10 years old perl code and I was a bit surprised by it.<p>But in other instance I pasted same function but with parameter name changed (event -&gt; events) and it just produced lies
2devnullabout 2 years ago
Anomaly detection is my current favorite use case for GPTs. Other problems can potentially be recast as anomaly detection that are not currently thought of as such. Regulation for instance.
noviaabout 2 years ago
There&#x27;s a company that does this log analysis in real time for you called Zebrium<p><a href="https:&#x2F;&#x2F;www.zebrium.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.zebrium.com&#x2F;</a>
aleccoabout 2 years ago
Same for obscure C++ compiler errors. You might need to make a small repro, first.
kordlessagainabout 2 years ago
Even better, give it a sample and have it write regex to find other entries like it.
greenie_beansabout 2 years ago
also for fixing bugs in a chunk of code. at least, that has worked for me a couple of times. it can be frustrating if it&#x27;s struggling, feels like you&#x27;re stuck in a loop and it&#x27;s hard to break out
评论 #35641926 未加载
penjellyabout 2 years ago
yes, but theres a limit to the characters input into chatgpt so you cant always just dump the logs in.
personjerryabout 2 years ago
How do you deal with the token limit?
fswdabout 2 years ago
wouldn&#x27;t embeddings be a better than ChatGPT?
评论 #35646809 未加载