How can I get the status of an IPFS file?

Hi, I’m new to IPFS, the IPFS is said to be the permanent web. However, I learned that a file will not be available when no node hosts it anymore which is sound. I know when I concern about the existence of some contents I should pin them myself. However, for some popular contents there’s no need for pining, for example, the jquery.js library.
So that brings up a question, how can I determine the popularity of a content? So that I can selectively pin the most precious content I have. To make the most of my space.

In general, there’s no bullet proof system.

You can call ipfs dht findprovs -n $MAX_PROVIDERS $HASH to find providers of a given chunk of a file (we store files in chunks). However, that doesn’t mean that any of these nodes have this file pinned (they may just have it cached temporarily).

We’re working on something called IPFS cluster to allow groups of people to collectively pin content they care about but it’s not quite production ready.