Replies: 10 comments 3 replies
-
OK, firstly just to check that pg_sentinel and pg_stat_statements are installed correctly. You should see a message such as follows if it is:
If something is not installed correctly it should find pg_active_session_history empty.
After this, then create a test program such as follows:
And run it as follows:
Do you get a number such as above? |
Beta Was this translation helpful? Give feedback.
-
Hello Steve, Thank you for the prompt response. Yes, the extensions installed correctly. I can see the following output, once I click the Start Metrics
However, when I try to run the program via tclsh I get the following error: I have a lower version of GLIBC which is 2.17 which does not seem to be ok for this scenario. Also, I have also double-checked the documentation and it turns out that for the Metrics to work properly the agent must be running on the server, right (the pg_HowManyProcessorsLinux function is there in the agent code)? |
Beta Was this translation helpful? Give feedback.
-
Hi Steve, Here is the output of the command:
and this
and here is the content of /proc/cpuinfo: processor : 1 Interestingly, it cannot parse the portion of the agent code which retrieves the number of CPU but when running alone the code works just fine. |
Beta Was this translation helpful? Give feedback.
-
Apologies, for the unformatted output. Used the code tag which didn't help. |
Beta Was this translation helpful? Give feedback.
-
Yes, so even if I create a file with your cpuinfo (many thanks for that) it works OK. As before, this is not exactly the same area of code but it uses the same function so can help to see if the problem does lie in parsing cpuinfo
|
Beta Was this translation helpful? Give feedback.
-
Unfortunately, when I run the agent on the server it throws an error: Whether this might be related hard to say. CentOS 7.9 is shipped with glibc 2.17, and updating it to 2.29 resulted in a failure because of so many dependencies. I've been struggling with this for a while but no success yet. Now, trying with CentOS 7.9. Getting the same issue: My server is a Virtual Box guest. If there is any chance of import it and debugging it I can share the export file (.ova or .ovf) in DropBox or similar. I was also wondering whether it can be any permission issue or similar !? |
Beta Was this translation helpful? Give feedback.
-
Would it be possible to change the code (temporarily for debugging purposes) in such a way that first it fetches other environment variables and then cpucount just to see whether all fail or only something in the pg_HowManyProcessorsLinux fails? Since running the agent on the server fails, I run it locally and it succeeded:
|
Beta Was this translation helpful? Give feedback.
-
Ok. Downloading RHEL 8. Will check and update here in few hours. |
Beta Was this translation helpful? Give feedback.
-
Hi Steve, I installed now CentOS8. First, the Metrics failed because the guest couldn't ping the host. Fixed it. Now works fine. But the the cpucount still cannot be fetched. Here is the output:
When starting the Metrics the error persists: Also, on the same server: How can we debug it further? |
Beta Was this translation helpful? Give feedback.
-
OK got it, after some troubleshooting and running PostgreSQL on RHEL8 on VBox I can reproduce. So a local client works fine and a Linux client works fine, but the crucial piece of information here is that if a client is running on Windows and connecting to a server running on Linux then you get the error:
So I am guessing that your HammerDB client is running on Windows and connecting to your Linux server running on VBox on the same host and there is a mismatch in finding the CPU count.
So to fix you can modify the source file pgmet.tcl in src/postgresql and modify the start of proc pg_HowManyProcessorsWindows from this:
To this:
In my testing this resolves the error call ash_fetch, error:can't read "public(cpucount)": no such element in array. |
Beta Was this translation helpful? Give feedback.
-
Dear friends,
I'm running HammerDB connected to Postgres14 on RHEL 7.9.
When starting the Metrics, getting the following error "call ash_fetch, error:can't read "public(cpucount)": no such element in array
"
Kindly, suggest what might be missing here.
Thank you,
Fadai.
Beta Was this translation helpful? Give feedback.
All reactions