"no function clause" error when calling folsom_vm_metrics:get_system_info() #32

Closed
awesometown opened this Issue Aug 29, 2012 · 5 comments

Projects

None yet

3 participants

@awesometown

I'm getting the error below when calling folsom_vm_metrics:get_system_info() on our servers:

** exception error: no function clause matching
                folsom_vm_metrics:'-convert_system_info/1-lc$^1/1-1-'({logical,
                                                                       0}) (src/folsom_vm_metrics.erl, line 102)
    in function  folsom_vm_metrics:'-get_system_info/0-lc$^0/1-0-'/1 (src/folsom_vm_metrics.erl, line 52)
    in call from folsom_vm_metrics:'-get_system_info/0-lc$^0/1-0-'/1 (src/folsom_vm_metrics.erl, line 52)

The same call works fine on my local machine. I believe the problem is related to what's being returned by erlang:system_info(cpu_topology). On my local machine, the value is:

[{processor,{logical,0}},{processor,{logical,1}}]

But on the server it's just:

{logical,0}

All of our servers are hosted Amazon EC2 instances, so I expect that may account for the difference, but I think folsom should be able to account for both cases?

@joewilliams
Contributor

Just to confirm, it's only the tuple {logical, 0} not contained inside a list or anything?

@joewilliams
Contributor

I think this is fixed on HEAD, give it a shot.

@awesometown

Yeah, it was just the tuple, not inside any list. Seems to be fixed in HEAD. Thanks :)

@lemenkov lemenkov added a commit to lemenkov/folsom that referenced this issue Sep 25, 2012
@lemenkov lemenkov Fix for single-core CPU
See boundary/folsom#32

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
2807711
@lemenkov
Contributor

Unfortunately this issue still exists in HEAD.

@joewilliams
Contributor

Please send me your erlang:system_info(cpu_topology) output and I'll merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment