TxdSharedNewbies
From TextUsers
Contents |
Checking disc space quota
From terminal run the command: quota -g
or from Webmin:
- Log in to your Webmin
- Click Virtualmin Virtual Servers (it will be a little sluggish, be patient :)
- Look at columns Total quota and Total used, row yourmainweb.tld
For more sophisticated procedure see this rsrcmeter for TxD from TextSnippet. The textsnippet does more than just show your disk space quota, it will also show you how much HTTP bandwidth you have used for the current month. The TextSnippet is copied below.
To install, type in a shell (ssh) session:
curl -o rsrcmeter http://ajz.textdriven.com/rsrcmeter.txt chmod u+x rsrcmeter
To run it, type:
./rsrcmeter
The code (as of 20 November 2006):
#!/usr/local/bin/ruby
Dir.chdir(ENV['HOME'])
# Disk usage
quotaline = `quota -g | tail -n 1`
usage = `echo -n "#{quotaline}" | awk '{print $2}'`.to_f
quota = `echo -n "#{quotaline}" | awk '{print $3}'`.to_f
percent_used = (usage / quota) * 100
puts "Disk usage: " + sprintf("%.4f", usage/1024) + " MiB (Quota: " +
sprintf("%.4f", quota/1024/1024) +" GiB; " + sprintf("%.1f", percent_used) + "% used)"
# HTTP Bandwidth
print "Calculating Bandwidth Usage..."
month = `date +"%B %Y"`.chomp
access_logs="access_log." + `date +%Y%m`.chomp + "??"
system("cat logs/access_log 2>/dev/null > temp-bandwidthcount") # Today's log
system("cat domains/*/logs/access_log 2>/dev/null >> temp-bandwidthcount")
system("cat logs/#{access_logs} 2>/dev/null >> temp-bandwidthcount") # Any logs not (yet) gzipped
system("cat domains/*/logs/#{access_logs} 2>/dev/null >> temp-bandwidthcount")
system("zcat logs/#{access_logs}.gz 2>/dev/null >> temp-bandwidthcount") # Gzipped logs from previous days
system("zcat domains/*/logs/#{access_logs}.gz 2>/dev/null >> temp-bandwidthcount")
usage = `cat temp-bandwidthcount | awk '{sum += $10} END {print sum}'`.chomp.to_f / 1024 / 1024
File.delete("temp-bandwidthcount")
30.times {print "\b"}
puts "Bandwidth used for #{month}: " + sprintf("%.4f", usage) + " MiB"
TextSnippet by ajz (aj on TxD forums)
Getting Help
If the answer to your problem isn't in this wiki or in the TextDrive Hosting Knowledge Base, you have a few options.
Posting to the Forum
Try the TextDrive Forum to connect with others in the TextDrive community and to get help with issues solvable by end-users (that's us). Of course we know you'll post under the right category, describe your problem in detail and how you've attempted to solve it, and thank those who help you.
Basic programming 101 type questions and those better addressed by other sources (like support forums specific to your application) tend not to get any responses on the Forum. If you've exhausted other sources and especially if the problem is TextDrive specific (it works under localhosting or on another host) then ask on the Forum.
If you're just getting started and need general advice or software recommendations, the community will be quite responsive. If you want to shoot the breeze, post under TextDrivel.
Don't hesitate to help other people, even if all you do is confirm the problem someone else is having (e.g., the encoding on their website is broken). We want to foster a community where people feel like their problems are being addressed. We're all in this boat together, so say "Hurrah" for reciprocal altruism. As others in the community get to know you, they'll be more responsive to your problems.
Submitting a Ticket
Some problems just aren't solvable by end users, in which case you will need to submit a ticket. Common problems/requests that require action by a TextDrive administrator:
- port requests (for Rails apps, Instiki, &c).
- billing, account upgrades and cancelations.
- upgrades for shared software on the server (not software that you've installed yourself, like TextPattern or Wordpress; upgrading these is your responsibility). Upgrades to major packages that everyone uses (like PHP or MySQL) are rolled out cautiously by the admins.
- enabling PostgreSQL on your account.
Response times are usually short and the answers are thorough. Every once in a while it seems as if a ticket falls through the cracks. We mostly respond to this by complaining on the Forum, but don't fret! Try submitting an update to your ticket instead.
