<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 10, 2015 at 7:12 PM, Michael Rasmussen <span dir="ltr"><<a href="mailto:mir@miras.org" target="_blank">mir@miras.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="">On Wed, 10 Jun 2015 17:04:20 +0100<br>
Peter Tribble <<a href="mailto:peter.tribble@gmail.com">peter.tribble@gmail.com</a>> wrote:<br>
<br>
><br>
> Delete that line in powertop.c and all should be well.<br>
><br></span></blockquote><div><br></div><div>FYI, I've looged illumos bug #6003<br><br><a href="https://www.illumos.org/issues/6003">https://www.illumos.org/issues/6003</a><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="">
</span>Do I need to build the entire illumos-gate to recompile powertop?<span class=""><br></span></blockquote><div><br></div><div>No. It can often be awkward to build individual tools, but as this is<br></div><div>a too that started out life elsewhere it's pretty easy. You don't even<br></div><div>need to pull the whole of the gate.<br><br>svn co <a href="https://github.com/illumos/illumos-gate/trunk/usr/src/cmd/powertop">https://github.com/illumos/illumos-gate/trunk/usr/src/cmd/powertop</a><br>cd powertop/common<br></div><div>[edit powertop.c]<br></div><div>gcc -m64 -c *.c ../amd64/pt_amd64.c <br>gcc -m64 -o powertop *.o -ldtrace -lkstat -lcurses<br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="">
> (I get the following as well:<br>
> powertop: failed to compile P-states (frequencies) program<br>
> powertop: failed to compile C-states (idle power) program<br>
> so I'm not sure it's actually functional.)<br>
><br>
</span>You need to run powertop either as root or using sudo.<br></blockquote><div><br></div><div>That's not it. Run it without adequate privileges and it will explicitly<br>tell you so. Tracing this a little further (this isn't on an omnios box,<br>by the way, but powertop *should* be the same) and attempting to<br></div><div>run the dtrace it creates by hand, I get.<br></div><div><br>"/usr/lib/dtrace/scsi.d", line 46: translator member ic_cdb definition uses incompatible types: "uint8_t *" = "user_desc_t"<br><br></div><div>At which point I gave up, because (a) I don't understand dtrace well<br>enough, and (b) the types used in the code look fine to me, and (c)<br></div><div>other than the fact that it fails to compile, whether this is actually the<br></div><div>compilation failure being reported by powertop is anyone's guess.<br></div><div><br></div></div>-- <br><div class="gmail_signature">-Peter Tribble<br><a href="http://www.petertribble.co.uk/" target="_blank">http://www.petertribble.co.uk/</a> - <a href="http://ptribble.blogspot.com/" target="_blank">http://ptribble.blogspot.com/</a></div>
</div></div>