Score:1

What is `/var/metrics` used for?

ph flag

As the title says. It doesn't seem to be part of FHS, and I could not find much in google. I'm wondering which applications write there, on which occasions, and for what purposes.

edit: In response to the comments: I am seeing it on a fresh install of Kubutnu 20.04, while inspecting it from another Linux. I haven't booted it yet. It is listed as drwxrwsrwt 2 root avahi-autoipd and is empty at the moment.

I'll run the diagnostics when I boot it, and will update.

Update:

  • From inside the system, it's listed as drwxrwsrwt 2 root whoopsie.
  • sudo dpkg -S /var/metrics doesn't find anything.
  • sudo lsof +D /var/metrics returns empty.
  • sudo find /var/metrics -print0 | xargs -0 --no-run-if-empty file returns /var/metrics: setgid, sticky, directory and nothing else. The folder is empty.

Doesn't look like it's being used yet on my system. It's just there.

Andrew Lowther avatar
jp flag
On minimal stock Ubuntu Bionic and Focal servers I do not have a `/var/metrics` directory. What is the output on your system of `dpkg -S /var/metrics`? Is there anything in the directory?
waltinator avatar
it flag
In addition to `dpkg -S /var/metrics`, see if it's in use at the monent: `sudo lsof +D /var/metrics`.
waltinator avatar
it flag
And `sudo find /var/metrics -print0 | xargs -0 --no-run-if-empty file`.
Terrance avatar
id flag
https://www.linux.org/threads/temporary-files.10817/ *"/var/metrics/ or /var/usermetrics/ contains various numerical data"*. I honestly don't think that you're going to find much data about the folder(s) as they might be used for compatibility.
MichaelK avatar
ph flag
@Terrance That's the only info I could find on that, but it's very vague.
Terrance avatar
id flag
Like the title in the link I shared, it is with the temporary files in Linux. Like the folder location says `/var` meaning variable as being for temporary usage like `/tmp`. As the system may need `metrics` for numbers temporary storage, that is where it is going to store that data for the time being. If I were to guess that it is probably there for when you use `metric` like in networking. Everything in Linux is a file and needs to go somewhere, so it will probably go to the `/var/metrics` folder for the time being until it is no longer in use.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.