Skip to content

Instantly share code, notes, and snippets.

@lostmsu
Created August 24, 2022 17:48
Show Gist options
  • Save lostmsu/b86898634a56c16962678fe59fbaebb4 to your computer and use it in GitHub Desktop.
Save lostmsu/b86898634a56c16962678fe59fbaebb4 to your computer and use it in GitHub Desktop.
example for command line calls from Stack
<!--
xmlns:dataSources="clr-namespace:LostTech.Stack.Widgets.DataSources;assembly=LostTech.Stack.Widgets"
-->
<dataSources:CommandLineDataSource x:Key="RemoteCall"
dataSources:DataSource.RefreshInterval="0:0:10">
<dataSources:CommandLineValueSource Program="ssh">
<dataSources:CommandLineValueSource.Arguments>
<x:String>-T</x:String>
<x:String>remote.pc.name.local</x:String>
<x:String>nvidia-smi</x:String>
<x:String>--query-gpu=utilization.gpu,memory.used,power.draw</x:String>
<x:String>--format=csv,noheader</x:String>
</dataSources:CommandLineValueSource.Arguments>
</dataSources:CommandLineValueSource>
</dataSources:CommandLineDataSource>
<!-- Text="{Binding Value, Source={StaticResource RemoteCall}, Mode=OneWay} -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment