Jump to content

Top Processes Based Memory or CPU Usage Workflow


Recommended Posts

Add the following contents to /etc/launchd.conf. Restart is required.

 

setenv LANG en_US.UTF-8

setenv LC_ALL en_US.UTF-8

 

The reason for this issue is locale and related encoding issue: http://www.alfredforum.com/topic/3287-shell-script-locale-in-maverick/

 

DO NOT do this to your system if you are a workflow developer. It will mask any encoding errors in your own code, which will then break on other people's computers.

 

For better or worse, OS X launches all applications with an empty environment. Better to explicitly set LANG and/or LC_ALL in your workflow/plugin so it will work on a normal system.

Link to comment
  • 1 year later...

alfred 3.0

 

ERROR me.zhaowu.top : A fatal error has occurred. You may seek help in the Alfred supporting site, forum or raise an issue in the bug tracking site.

#
./alfred2_top_workflow.rb:131:in split' ./alfred2_top_workflow.rb:131:inblock in ps_list'
./alfred2_top_workflow.rb:130:in each' ./alfred2_top_workflow.rb:130:inps_list'
./alfred2_top_workflow.rb:168:in top_processes' ./alfred2_top_workflow.rb:257:inblock in 

'
.../Alfred.alfredpreferences/workflows/user.workflow.C6BEF5BB-68AE-4C94-965E-D9D1686C3344/bundle/ruby/2.0.0/gems/alfred-workflow-1.2.7/lib/alfred.rb:26:in with_friendly_error' ./alfred2_top_workflow.rb:246:in'

Edited by pi1ot
Link to comment
  • 7 months later...

I'm having issues with the glance feature. Alfred 3.3 on MacOS 10.12.3 Sierra

 

Ran ./bin/smc -k TC0P,TG0P,F0Ac,F1Ac -r -c returned >
  .../Alfred.alfredpreferences/workflows/user.workflow.0B232D11-6392-4C33-B21F-CDF19406B01B/bundle/ruby/2.0.0/gems/mixlib-shellout-1.2.0/lib/mixlib/shellout.rb:251:in `invalid!'  
.../Alfred.alfredpreferences/workflows/user.workflow.0B232D11-6392-4C33-B21F-CDF19406B01B/bundle/ruby/2.0.0/gems/mixlib-shellout-1.2.0/lib/mixlib/shellout.rb:237:in `error!'  
./glance.rb:25:in `sh'  
./glance.rb:59:in `collect_temperature'  
./glance.rb:48:in `collect'  
./glance.rb:315:in `generate_feedback'  
./glance.rb:324:in `block in <main>'  
.../Alfred.alfredpreferences/workflows/user.workflow.0B232D11-6392-4C33-B21F-CDF19406B01B/bundle/ruby/2.0.0/gems/alfred-workflow-2.0.5/lib/alfred.rb:82:in `with_friendly_error'  
./glance.rb:322:in `<main>'

Link to comment
  • 5 months later...

Same issue here...

 

---- End output of ./bin/smc -k TC0P,TG0P,F0Ac,F1Ac -r -c ----
Ran ./bin/smc -k TC0P,TG0P,F0Ac,F1Ac -r -c returned >
  /Users/___/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.4B37E954-A444-4EEB-9F72-8AC642515F57/bundle/ruby/2.0.0/gems/mixlib-shellout-1.2.0/lib/mixlib/shellout.rb:251:in `invalid!'  
/Users/___/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.4B37E954-A444-4EEB-9F72-8AC642515F57/bundle/ruby/2.0.0/gems/mixlib-shellout-1.2.0/lib/mixlib/shellout.rb:237:in `error!'  
./glance.rb:25:in `sh'  
./glance.rb:59:in `collect_temperature'  
./glance.rb:48:in `collect'  
./glance.rb:315:in `generate_feedback'  
./glance.rb:324:in `block in <main>'  
/Users/___/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.4B37E954-A444-4EEB-9F72-8AC642515F57/bundle/ruby/2.0.0/gems/alfred-workflow-2.0.5/lib/alfred.rb:82:in `with_friendly_error'  
./glance.rb:322:in `<main>'

E, [2017-08-03 15:40:13 #2515] ERROR -- me.zhaowu.top: A fatal error has occurred. You may seek help in the Alfred supporting site, forum or raise an issue in the bug tracking site.
  #<Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received ''

Link to comment
On 03/08/2017 at 9:56 AM, rinopoli said:

Same issue here...

 

---- End output of ./bin/smc -k TC0P,TG0P,F0Ac,F1Ac -r -c ----
Ran ./bin/smc -k TC0P,TG0P,F0Ac,F1Ac -r -c returned >
  /Users/___/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.4B37E954-A444-4EEB-9F72-8AC642515F57/bundle/ruby/2.0.0/gems/mixlib-shellout-1.2.0/lib/mixlib/shellout.rb:251:in `invalid!'  
/Users/___/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.4B37E954-A444-4EEB-9F72-8AC642515F57/bundle/ruby/2.0.0/gems/mixlib-shellout-1.2.0/lib/mixlib/shellout.rb:237:in `error!'  
./glance.rb:25:in `sh'  
./glance.rb:59:in `collect_temperature'  
./glance.rb:48:in `collect'  
./glance.rb:315:in `generate_feedback'  
./glance.rb:324:in `block in <main>'  
/Users/___/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.4B37E954-A444-4EEB-9F72-8AC642515F57/bundle/ruby/2.0.0/gems/alfred-workflow-2.0.5/lib/alfred.rb:82:in `with_friendly_error'  
./glance.rb:322:in `<main>'

E, [2017-08-03 15:40:13 #2515] ERROR -- me.zhaowu.top: A fatal error has occurred. You may seek help in the Alfred supporting site, forum or raise an issue in the bug tracking site.
  #<Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received ''


Same problem here! Someone managed to find a solution? Thanks!

Link to comment
  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...