How to read from /proc

Hello, all functions that i need for that are disabled, so i created this topic.

How to read from /proc on this hosting?

` operator is disabled too, as it runs shell_exec()

I need this for load balancing

Why needing to load balance? The servers are already load balanced, and /proc? Processor information? I don’t think that’s gonna happen.

shell_exec is also disabled because of the security risks it can pose.

1 Like

I’ve already talked about it in the post
Also, load balancing is needed to make my site not suspending in every 5mins.
/proc contains system info

So have your site on multiple servers at once? This could be done with some rewrite rules. System info? Still a big no to gaining access. remember users are locked in their home directory.

No, my site is on one server.

Can you explain, How would you intend to load balance?

Something changed on InfinityFree, i always was using ` operator to execute commands and it worked.

So, in code i’m getting memory usage, and peak of that memory usage, then load of server and process count.
Then i check, if, for example, used memory and peak of used memory is bigger than maximum allowed by me, it will die();

Everything works except of getting process count.
I can give code if that is needed

It also be good if admin adds /proc into open_basedir

@Admin, i’m mentioning you to have answer.

You can’t.

No, you don’t.

Exactly. It contains information about the entire system. This system is shared with many thousands of other websites. The information in /proc doesn’t tell you anything whatsoever about the server power used by your site.

No, website optimization or upgrading is needed if you don’t want to get suspended. We’re not going to help you to strain the servers as much as possible for free. This is also why we don’t disclose exact numbers about the resource limits: we want you to say within the limits, not try to skirt them.


Overall, your idea is not bad. The thing is that it just doesn’t work on shared hosting at all ever. On a VPS or dedicated server, this can work, because the server load and website load and related. But if you’re sharing a server with thousands of others, server load doesn’t tell you anything about your site.

6 Likes

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.